forked from avh4/elm-format
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (21 loc) · 863 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
# stack installation from https://github.com/samdoshi/docker-haskell-stack
FROM buildpack-deps:latest
ENV STACK_VERSION 1.4.0
ENV STACK_DOWNLOAD_URL https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz
ENV DEBIAN_FRONTEND noninteractive
ENV PATH $PATH:/root/.local/bin
ENV LANG C.UTF-8
RUN apt-get update -q && \
apt-get install -qy libgmp-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mkdir -p /root/.local/bin && \
wget -q -O- $STACK_DOWNLOAD_URL | tar --strip=1 -xvz -C /root/.local/bin/ && \
chmod +x /root/.local/bin/stack
# Install elm-format dependencies
COPY stack.yaml ./
RUN stack setup
COPY elm-format-short.cabal ./
RUN stack build --only-snapshot
RUN stack build --only-dependencies
RUN stack build --test --only-dependencies