Skip to content

Commit

Permalink
Update arm64.Dockerfile
Browse files Browse the repository at this point in the history
Removes `stack setup ghc-8.10.4` and `stack update`, as neither should be required.

Replaces `RUN cd /src` with `WORKDIR /src` as former does not appear to have the desired effect.

Consistent with `release.hs`, use `--nightly-2022-08-02 --extra-dep Cabal-3.6.3.0` with final `stack script`.

Also uses separate `RUN` commands rather than `&&`, for shorter lines and better clarity.
  • Loading branch information
mpilgrem committed Aug 29, 2022
1 parent 55291b3 commit 808abc7
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions etc/dockerfiles/arm64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,27 @@ RUN curl -sSL https://github.com/commercialhaskell/stack/releases/download/v2.7.
ARG USERID
ARG GROUPID

RUN useradd --uid $USERID stack && mkdir -p /home/stack && chown -R stack /home/stack && usermod -aG $GROUPID stack
RUN useradd --uid $USERID stack
RUN mkdir -p /home/stack
RUN chown -R stack /home/stack
RUN usermod -aG $GROUPID stack

USER stack
WORKDIR /home/stack

RUN stack setup ghc-8.10.4
RUN stack update

COPY stack.yaml package.yaml /src/

USER root

RUN chown -R stack /src

USER stack
RUN cd /src && stack build --only-snapshot --test && stack build shake
WORKDIR /src

RUN stack build --only-snapshot --test
RUN stack build shake

COPY etc/scripts/release.hs /src
RUN stack script --resolver lts-17.15 --compile /src/release.hs -- --version && cp /src/release /home/stack

RUN stack script --resolver nightly-2022-08-02 --extra-dep Cabal-3.6.3.0 --compile /src/release.hs -- --version
RUN cp /src/release /home/stack

0 comments on commit 808abc7

Please sign in to comment.