@@ -1,20 +1,24 @@
11# USE ALPINE LINUX
2−FROM alpine:edge
2+FROM alpine
3+RUN apk update
4+# INSTALL BASIC DEV TOOLS, GHC, GMP & ZLIB
35RUN echo "https://s3-us-west-2.amazonaws.com/alpine-ghc/8.0" >> /etc/apk/repositories
46ADD https://raw.githubusercontent.com/mitchty/alpine-ghc/master/mitch.tishmack%40gmail.com-55881c97.rsa.pub \
57 /etc/apk/keys/mitch.tishmack@gmail.com-55881c97.rsa.pub
68RUN apk update
7−RUN apk add alpine-sdk git ca-certificates ghc cabal stack zlib-dev \
8− dpkg fakeroot sed gawk grep bash linux-headers
9−ENV PATH="/root/.local/bin:${PATH}"
10−RUN stack update
11−RUN stack upgrade
9+RUN apk add alpine-sdk git ca-certificates ghc gmp-dev zlib-dev bash dpkg fakeroot
10+# GRAB A RECENT BINARY OF STACK
11+RUN curl -L https://www.stackage.org/stack/linux-x86_64-static | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
12+# COMPRESS WITH UPX
13+ADD https://github.com/lalyos/docker-upx/releases/download/v3.91/upx /usr/local/bin/upx
14+RUN chmod 755 /usr/local/bin/upx
15+RUN ulimit -n 4096
1216RUN stack config set system-ghc --global true
1317#RUN mkdir -p /etc/stack
1418#RUN echo "build: { split-objs: true }" > /etc/stack/config.yaml
1519RUN mkdir -p /usr/src/
1620WORKDIR /usr/src/
17−RUN git clone https://github.com/jgm/pandoc
21+RUN git clone https://github.com/jgm/pandoc
1822WORKDIR /usr/src/pandoc
1923RUN stack install --stack-yaml stack.lts9.yaml \
2024 --only-dependencies \