-
Notifications
You must be signed in to change notification settings - Fork 152
/
Copy pathDockerfile.stack-deps
33 lines (27 loc) · 1.44 KB
/
Dockerfile.stack-deps
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
ARG BASE_OS
ARG BASE_DISTRO
FROM ${BASE_OS}:${BASE_DISTRO}
ENV TZ=America/Chicago
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& apt-get upgrade --yes \
&& apt-get install --yes \
curl \
libsecp256k1-dev \
libtinfo-dev \
pkg-config
RUN curl -sSL https://get.haskellstack.org/ | sh
# The image is built specifically for an environment with this user/group
ARG USER=github-user
ARG GROUP=$USER
ARG USER_ID=1000
ARG GROUP_ID=$USER_ID
RUN groupadd -g $GROUP_ID $GROUP && useradd -m -u $USER_ID -s /bin/sh -g $GROUP $USER
USER $USER:$GROUP
ENV LC_ALL=C.UTF-8
ADD --chown=$USER:$GROUP haskell-backend/src/main/native/haskell-backend/stack.yaml /home/$USER/.tmp-haskell/
ADD --chown=$USER:$GROUP haskell-backend/src/main/native/haskell-backend/kore/kore.cabal /home/$USER/.tmp-haskell/kore/
ADD --chown=$USER:$GROUP haskell-backend/src/main/native/haskell-backend/kore-rpc-types/kore-rpc-types.cabal /home/$USER/.tmp-haskell/kore-rpc-types/
ADD --chown=$USER:$GROUP haskell-backend/src/main/native/haskell-backend/booster/package.yaml /home/$USER/.tmp-haskell/booster/
ADD --chown=$USER:$GROUP haskell-backend/src/main/native/haskell-backend/dev-tools/package.yaml /home/$USER/.tmp-haskell/dev-tools/
RUN cd /home/$USER/.tmp-haskell && stack build --only-snapshot