-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
39 lines (34 loc) · 988 Bytes
/
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
FROM amazonlinux:latest
MAINTAINER Jasper Van der Jeugt <[email protected]>
ARG STACK_RESOLVER
## Install stack, stack dependencies, python tooling.
RUN yum install -y \
curl \
gcc \
git \
gmp-devel \
gzip \
make \
ncurses-compat-libs \
ncurses-devel \
python3-pip \
ssh \
tar \
unzip \
xz \
zip \
zlib-devel;
## Link python versions.
RUN ln -sf /usr/bin/python3 /usr/bin/python; \
ln -sf /usr/bin/pip3 /usr/bin/pip;
## Install stack.
RUN curl -sSL https://get.haskellstack.org/ | sh;
## Share a stack root among users.
ENV STACK_ROOT="/var/lib/stack"
## Start build. This takes a while. We also make writable for other users,
## since don't know what user will do an actual build.
COPY preinstalled-haskell-packages.txt /etc/
RUN mkdir "$STACK_ROOT" && \
xargs stack --allow-different-user --resolver "$STACK_RESOLVER" install \
</etc/preinstalled-haskell-packages.txt && \
chmod -R a+rw "$STACK_ROOT"