Skip to content

Commit

Permalink
Update Dockerfile (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
yvan-sraka authored Feb 27, 2024
1 parent 7737696 commit 2f4fa7f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ ARG COMPILER_NIX_NAME="ghc961"
ARG MINIMAL="true"
ARG IOG="false"

RUN apt-get update \
&& yes | apt-get install curl git jq nix zstd \
RUN DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get -y install curl git jq nix zstd \
&& curl -L https://raw.githubusercontent.com/input-output-hk/actions/latest/devx/support/fetch-docker.sh -o fetch-docker.sh \
&& chmod +x fetch-docker.sh \
&& SUFFIX='' \
&& if [ "$MINIMAL" = "true" ]; then SUFFIX="${SUFFIX}-minimal"; fi \
&& if [ "$IOG" = "true" ]; then SUFFIX="${SUFFIX}-iog"; fi \
&& ./fetch-docker.sh input-output-hk/devx $PLATFORM.$COMPILER_NIX_NAME$TARGET_PLATFORM${SUFFIX}-env | zstd -d | nix-store --import | tee store-paths.txt \
&& yes | apt-get remove curl jq nix zstd \
&& yes | apt-get autoremove \
&& yes | apt-get autoclean
&& apt-get -y remove curl git jq nix zstd \
&& apt-get -y autoremove \
&& apt-get -y autoclean

# `tail -n 2 X | head -n 1` seems a bit fragile way to get `ghc8107-iog-env.sh` derivation path ...
RUN echo "source $(tail -n 2 store-paths.txt | head -n 1)" >> $HOME/.bashrc

0 comments on commit 2f4fa7f

Please sign in to comment.