git.iko.soy/typeable/pandoc
on master help sign in
Update linux Dockerfile to use cabal new-build.
commit473b4ad62d676188d1127e9b4fc4b8fdec514207 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 26 Nov 2018, 23:15 (8 years ago) parent56b4b07
1 file changed+14−19
linux/Dockerfile+14−19
linux/Dockerfile+14−19
@@ -1,29 +1,24 @@
11# USE ALPINE LINUX
22FROM alpine
33RUN apk update
4−RUN apk add alpine-sdk git ca-certificates ghc gmp-dev zlib-dev bash dpkg fakeroot
5−# GRAB A RECENT BINARY OF STACK
6−RUN curl -L https://github.com/commercialhaskell/stack/releases/download/v1.9.1/stack-1.9.1-linux-x86_64-static.tar.gz | tar xvz
7−RUN cp stack-1.9.1-linux-x86_64-static/stack /usr/local/bin/stack
8−RUN chmod +x /usr/local/bin/stack
9−ENV PATH="/usr/local/bin:${PATH}"
10−RUN ulimit -n 4096
11−RUN stack config set system-ghc --global true
12−RUN stack setup --resolver lts-12.12
4+RUN apk add alpine-sdk git ca-certificates ghc gmp-dev zlib-dev bash dpkg fakeroot cabal
135RUN mkdir -p /usr/src/
146WORKDIR /usr/src/
157RUN git clone https://github.com/jgm/pandoc
8+RUN git clone https://github.com/jgm/pandoc-citeproc
169WORKDIR /usr/src/pandoc
17−CMD git pull && \
10+RUN cabal update && \
11+ cabal install cabal-install-2.4.0.0 && \
12+ cp $HOME/.cabal/bin/cabal /usr/bin/
13+CMD cabal --version && \
14+ ghc --version && \
15+ git pull && \
1816 git checkout -b work $TREE && \
19− stack install \
20− --flag 'pandoc:static' \
21− --flag 'pandoc:embed_data_files' \
22− --flag 'pandoc-citeproc:static' \
23− --flag 'pandoc-citeproc:embed_data_files' \
24− --flag 'hslua:-export-dynamic' \
25− --ghc-options '-O2 -optc-Os -optl=-pthread -optl=-static -fPIC' \
26− --local-bin-path /artifacts \
27− pandoc pandoc-citeproc && \
17+ cabal new-update && \
18+ cabal new-clean && \
19+ cabal new-configure --enable-tests -f-export-dynamic -fstatic -fembed_data_files -fbibutils --ghc-options '-O2 -optc-Os -optl=-pthread -optl=-static -fPIC' . pandoc-citeproc && \
20+ cabal new-build . pandoc-citeproc && \
21+ cabal new-test -j1 . pandoc-citeproc && \
22+ for f in $(find dist-newstyle -name 'pandoc*' -type f -perm +400); do cp $f /artifacts/; done && \
2823 bash linux/make_deb.sh && \
2924 bash linux/make_tarball.sh