-
Notifications
You must be signed in to change notification settings - Fork 5
/
ghc-Dockerfile
43 lines (38 loc) · 1.17 KB
/
ghc-Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM alpine:3.18.3
RUN apk upgrade --no-cache &&\
apk add --no-cache \
curl \
gcc \
git \
libc-dev \
xz \
gmp-dev \
autoconf \
automake \
binutils \
build-base \
coreutils \
cpio \
linux-headers \
libffi-dev \
musl-dev \
zlib-dev \
zlib-static \
ncurses-dev \
ncurses-libs \
ncurses-static \
bash \
lld \
shadow # for stack --docker, provides groupadd
RUN curl -sSLo /usr/local/bin/stack https://github.com/commercialhaskell/stack/releases/download/v2.11.1/stack-2.11.1-linux-x86_64-bin && \
chmod +x /usr/local/bin/stack
# https://stackoverflow.com/a/41517423
RUN ln -s /usr/lib/libncurses.a /usr/lib/libtinfo.a
COPY stack-config.yaml /root/.stack/config.yaml
RUN cd /tmp && \
curl -sSLo /tmp/ghc.tar.xz https://downloads.haskell.org/~ghc/9.2.8/ghc-9.2.8-x86_64-alpine3.12-linux-gmp.tar.xz && \
tar xf ghc.tar.xz && \
cd ghc-9.2.8-x86_64-unknown-linux && \
./configure --prefix=/usr/local && \
make install && \
rm -rf /tmp/ghc.tar.xz /tmp/ghc-9.2.8-x86_64-unknown-linux