Skip to content

Commit 1cb1ec1

Browse files
committed
Adjust with --isolate
1 parent 93863bf commit 1cb1ec1

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

8.10/ghcup/Dockerfile

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM debian:buster AS builder
22

33
ENV LANG C.UTF-8
44

5+
# install prerequisites
56
RUN apt-get update && \
67
apt-get install -y --no-install-recommends \
78
ca-certificates \
@@ -16,24 +17,24 @@ RUN apt-get update && \
1617
curl && \
1718
rm -rf /var/lib/apt/lists/*
1819

20+
# install ghcup
1921
ARG GHCUP_VERSION=0.1.16.2
22+
RUN curl --proto '=https' --tlsv1.2 -sSf https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION > /usr/bin/ghcup && \
23+
chmod +x /usr/bin/ghcup
2024

21-
RUN curl -fSL https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION -o ghcup && \
22-
chmod +x ghcup
23-
25+
# install cabal
2426
ARG CABAL_VERSION=3.4.0.0
27+
RUN ghcup install cabal -i /usr/bin $CABAL_VERSION
2528

26-
RUN ./ghcup install cabal $CABAL_VERSION && \
27-
./ghcup set cabal $CABAL_VERSION
28-
29-
ARG GHC_VERSION=8.10.6
30-
31-
RUN ./ghcup install ghc $GHC_VERSION && \
32-
./ghcup set ghc $GHC_VERSION
33-
29+
# install stack
3430
ARG STACK_VERSION=2.7.3
31+
RUN ghcup install stack -i /usr/bin $STACK_VERSION
3532

36-
RUN ./ghcup install stack $STACK_VERSION && \
37-
./ghcup set stack $STACK_VERSION
33+
# install GHC into /opt/ghc
34+
ARG GHC_VERSION=8.10.6
35+
RUN ghcup install ghc -i /opt/ghc $GHC_VERSION
3836

39-
RUN cp -H /root/.ghcup/bin/* /usr/local/bin
37+
# Adjust PATH
38+
RUN echo 'export PATH="/opt/ghc/bin:$PATH"' >> /etc/profile.d/ghcup_path.sh && \
39+
chmod +x /etc/profile.d/ghcup_path.sh
40+
ENV PATH="/opt/ghc/bin:$PATH"

0 commit comments

Comments
 (0)