Skip to content

Commit

Permalink
Adjust with --isolate
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Aug 22, 2021
1 parent 93863bf commit 1cb1ec1
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions 8.10/ghcup/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
# 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"

0 comments on commit 1cb1ec1

Please sign in to comment.