File tree 1 file changed +40
-0
lines changed 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM debian:buster AS builder
2
+
3
+ ENV LANG C.UTF-8
4
+
5
+ # install prerequisites
6
+ RUN apt-get update && \
7
+ apt-get install -y --no-install-recommends \
8
+ ca-certificates \
9
+ build-essential \
10
+ libffi-dev \
11
+ libffi6 \
12
+ libgmp-dev \
13
+ libgmp10 \
14
+ libncurses-dev \
15
+ libncurses5 \
16
+ libtinfo5 \
17
+ curl && \
18
+ rm -rf /var/lib/apt/lists/*
19
+
20
+ # install ghcup
21
+ 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
24
+
25
+ # install cabal
26
+ ARG CABAL_VERSION=3.4.0.0
27
+ RUN ghcup install cabal -i /usr/bin $CABAL_VERSION
28
+
29
+ # install stack
30
+ ARG STACK_VERSION=2.7.3
31
+ RUN ghcup install stack -i /usr/bin $STACK_VERSION
32
+
33
+ # install GHC into /opt/ghc
34
+ ARG GHC_VERSION=8.10.6
35
+ RUN ghcup install ghc -i /opt/ghc $GHC_VERSION
36
+
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"
You can’t perform that action at this time.
0 commit comments