Skip to content

Commit

Permalink
Fix path to leios executable in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly committed Jul 7, 2024
1 parent 0e5137a commit d803588
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,14 @@ jobs:
# image_id: ${{ steps.push.outputs.imageid }}
# image_tag: ${{ steps.meta.outputs.tags }}

# TODO: uncomment once the repository is public
#
# This step generates an artifact attestation for the image,
# which is an unforgeable statement about where and how it was
# built. It increases supply chain security for people who
# consume the image. For more information, see
# "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."

# - name: Generate artifact attestation
# uses: actions/attest-build-provenance@v1
# with:
# subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
# subject-digest: ${{ steps.push.outputs.digest }}
# push-to-registry: true
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# inspired by https://github.com/phadej/docker-haskell-example/blob/master/Dockerfile
FROM haskell:9.6.3 as build
FROM haskell:9.6.3 AS build

RUN apt-get update -y && \
apt-get upgrade -y && \
Expand All @@ -21,14 +21,14 @@ COPY . /app
RUN cabal build all

# Make final binary a bit smaller
RUN strip dist-newstyle/build/x86_64-linux/ghc-9.6.3/leios-0.1.0.0/x/leios/noopt/build/leios/leios
RUN strip dist-newstyle/build/x86_64-linux/ghc-9.6.3/leios-sim-0.1.0.0/x/leios/build/leios/leios

FROM ubuntu:22.04

WORKDIR /app
EXPOSE 8091

COPY --from=build /app/leios-sim/* /app/
COPY --from=build /app/dist-newstyle/build/x86_64-linux/ghc-9.6.3/leios-0.1.0.0/x/leios/noopt/build/leios/leios /app
COPY --from=build /app/dist-newstyle/build/x86_64-linux/ghc-9.6.3/leios-sim-0.1.0.0/x/leios/build/leios/leios /app

ENTRYPOINT ["/app/leios"]

0 comments on commit d803588

Please sign in to comment.