From 1cb1ec15fc2edf2bea1e378d6fc30efe86494bb3 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 22 Aug 2021 09:09:01 +0200 Subject: [PATCH] Adjust with --isolate --- 8.10/ghcup/Dockerfile | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/8.10/ghcup/Dockerfile b/8.10/ghcup/Dockerfile index 01a5edd..38b2902 100644 --- a/8.10/ghcup/Dockerfile +++ b/8.10/ghcup/Dockerfile @@ -2,6 +2,7 @@ FROM debian:buster AS builder ENV LANG C.UTF-8 +# install prerequisites RUN apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates \ @@ -16,24 +17,24 @@ RUN apt-get update && \ curl && \ rm -rf /var/lib/apt/lists/* +# install ghcup ARG GHCUP_VERSION=0.1.16.2 +RUN curl --proto '=https' --tlsv1.2 -sSf https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION > /usr/bin/ghcup && \ + chmod +x /usr/bin/ghcup -RUN curl -fSL https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION -o ghcup && \ - chmod +x ghcup - +# install cabal ARG CABAL_VERSION=3.4.0.0 +RUN ghcup install cabal -i /usr/bin $CABAL_VERSION -RUN ./ghcup install cabal $CABAL_VERSION && \ - ./ghcup set cabal $CABAL_VERSION - -ARG GHC_VERSION=8.10.6 - -RUN ./ghcup install ghc $GHC_VERSION && \ - ./ghcup set ghc $GHC_VERSION - +# install stack ARG STACK_VERSION=2.7.3 +RUN ghcup install stack -i /usr/bin $STACK_VERSION -RUN ./ghcup install stack $STACK_VERSION && \ - ./ghcup set stack $STACK_VERSION +# install GHC into /opt/ghc +ARG GHC_VERSION=8.10.6 +RUN ghcup install ghc -i /opt/ghc $GHC_VERSION -RUN cp -H /root/.ghcup/bin/* /usr/local/bin \ No newline at end of file +# Adjust PATH +RUN echo 'export PATH="/opt/ghc/bin:$PATH"' >> /etc/profile.d/ghcup_path.sh && \ + chmod +x /etc/profile.d/ghcup_path.sh +ENV PATH="/opt/ghc/bin:$PATH"