aboutsummaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-04-23 22:43:10 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-04-23 22:43:10 -0700
commit58534cc74edd6b3492367cfe612286ad8301070f (patch)
tree1f8298be58f38929e4261c04d06aa7154660e9db /linux
parent4ca51ab76c8b2965f48d38a5ed7c97e4f7f9962d (diff)
downloadpandoc-58534cc74edd6b3492367cfe612286ad8301070f.tar.gz
Revised Dockerfile for static linux build.
Diffstat (limited to 'linux')
-rw-r--r--linux/Dockerfile18
1 files changed, 11 insertions, 7 deletions
diff --git a/linux/Dockerfile b/linux/Dockerfile
index b64908b6b..132e189b9 100644
--- a/linux/Dockerfile
+++ b/linux/Dockerfile
@@ -1,20 +1,24 @@
# USE ALPINE LINUX
-FROM alpine:edge
+FROM alpine
+RUN apk update
+# INSTALL BASIC DEV TOOLS, GHC, GMP & ZLIB
RUN echo "https://s3-us-west-2.amazonaws.com/alpine-ghc/8.0" >> /etc/apk/repositories
ADD https://raw.githubusercontent.com/mitchty/alpine-ghc/master/mitch.tishmack%40gmail.com-55881c97.rsa.pub \
/etc/apk/keys/mitch.tishmack@gmail.com-55881c97.rsa.pub
RUN apk update
-RUN apk add alpine-sdk git ca-certificates ghc cabal stack zlib-dev \
- dpkg fakeroot sed gawk grep bash linux-headers
-ENV PATH="/root/.local/bin:${PATH}"
-RUN stack update
-RUN stack upgrade
+RUN apk add alpine-sdk git ca-certificates ghc gmp-dev zlib-dev bash dpkg fakeroot
+# GRAB A RECENT BINARY OF STACK
+RUN curl -L https://www.stackage.org/stack/linux-x86_64-static | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
+# COMPRESS WITH UPX
+ADD https://github.com/lalyos/docker-upx/releases/download/v3.91/upx /usr/local/bin/upx
+RUN chmod 755 /usr/local/bin/upx
+RUN ulimit -n 4096
RUN stack config set system-ghc --global true
#RUN mkdir -p /etc/stack
#RUN echo "build: { split-objs: true }" > /etc/stack/config.yaml
RUN mkdir -p /usr/src/
WORKDIR /usr/src/
-RUN git clone https://github.com/jgm/pandoc
+RUN git clone https://github.com/jgm/pandoc
WORKDIR /usr/src/pandoc
RUN stack install --stack-yaml stack.lts9.yaml \
--only-dependencies \