git.iko.soy/typeable/pandoc
on master help sign in
linux/Dockerfile: simplify and use new ghc 8.4.3.
commitcccaf33e2d2976ed6b875ce195b57f770d3e9617 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 15 Jul 2018, 20:25 (8 years ago) parent75cf1f5
1 file changed+3−35
linux/Dockerfile+3−35
linux/Dockerfile+3−35
@@ -1,13 +1,10 @@
11# USE ALPINE LINUX
22FROM alpine
33RUN apk update
4−# INSTALL BASIC DEV TOOLS, GHC, GMP & ZLIB
5−RUN echo "https://s3-us-west-2.amazonaws.com/alpine-ghc/8.0" >> /etc/apk/repositories
6−ADD https://raw.githubusercontent.com/mitchty/alpine-ghc/master/mitch.tishmack%40gmail.com-55881c97.rsa.pub \
7− /etc/apk/keys/mitch.tishmack@gmail.com-55881c97.rsa.pub
84RUN apk update
95RUN apk add alpine-sdk git ca-certificates ghc gmp-dev zlib-dev bash dpkg fakeroot
106# GRAB A RECENT BINARY OF STACK
7+# Note that 1.6.5 is the last one with a static binary...
118RUN curl -L https://github.com/commercialhaskell/stack/releases/download/v1.6.5/stack-1.6.5-linux-x86_64-static.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
129# COMPRESS WITH UPX
1310ADD https://github.com/lalyos/docker-upx/releases/download/v3.91/upx /usr/local/bin/upx
@@ -15,43 +12,14 @@ ENV PATH="/usr/local/bin:${PATH}"
1512RUN chmod 755 /usr/local/bin/upx
1613RUN ulimit -n 4096
1714RUN stack config set system-ghc --global true
18−RUN stack --resolver lts-9 setup --install-cabal 2.0.1.1
19−#RUN mkdir -p /etc/stack
20−#RUN echo "build: { split-objs: true }" > /etc/stack/config.yaml
15+RUN stack setup --resolver lts-12
2116RUN mkdir -p /usr/src/
2217WORKDIR /usr/src/
2318RUN git clone https://github.com/jgm/pandoc
2419WORKDIR /usr/src/pandoc
25−RUN stack install --stack-yaml stack.lts9.yaml \
26− --only-dependencies \
27− --flag 'pandoc:static' \
28− --flag 'pandoc:embed_data_files' \
29− --flag 'pandoc-citeproc:static' \
30− --flag 'pandoc-citeproc:embed_data_files' \
31− --flag 'hslua:-export-dynamic' \
32− --ghc-options '-O2 -optc-Os -optl=-pthread -optl=-static -fPIC' \
33− aeson
34−RUN stack install --stack-yaml stack.lts9.yaml \
35− --only-dependencies \
36− --flag 'pandoc:static' \
37− --flag 'pandoc:embed_data_files' \
38− --flag 'pandoc-citeproc:static' \
39− --flag 'pandoc-citeproc:embed_data_files' \
40− --flag 'hslua:-export-dynamic' \
41− --ghc-options '-O2 -optc-Os -optl=-pthread -optl=-static -fPIC' \
42− http-client-tls
43−RUN stack install --stack-yaml stack.lts9.yaml \
44− --only-dependencies \
45− --flag 'pandoc:static' \
46− --flag 'pandoc:embed_data_files' \
47− --flag 'pandoc-citeproc:static' \
48− --flag 'pandoc-citeproc:embed_data_files' \
49− --flag 'hslua:-export-dynamic' \
50− --ghc-options '-O2 -optc-Os -optl=-pthread -optl=-static -fPIC' \
51− pandoc pandoc-citeproc
5220CMD git pull && \
5321 git checkout -b work $TREE && \
54− stack install --stack-yaml stack.lts9.yaml \
22+ stack install \
5523 --flag 'pandoc:static' \
5624 --flag 'pandoc:embed_data_files' \
5725 --flag 'pandoc-citeproc:static' \