git.iko.soy/typeable/pandoc
on 3cb8a3f help sign in
29 lines 1.1 kB history raw
1# USE ALPINE LINUX
2FROM alpine
3RUN apk update
4RUN apk add alpine-sdk git ca-certificates ghc gmp-dev zlib-dev bash dpkg fakeroot
5# GRAB A RECENT BINARY OF STACK
6RUN curl -L https://github.com/commercialhaskell/stack/releases/download/v1.9.1/stack-1.9.1-linux-x86_64-static.tar.gz | tar xvf
7RUN cp stack-1.9.1-linux-x86_64-static/stack /usr/local/bin/stack
8RUN chmod +x /usr/local/bin/stack
9ENV PATH="/usr/local/bin:${PATH}"
10RUN ulimit -n 4096
11RUN stack config set system-ghc --global true
12RUN stack setup --resolver lts-12
13RUN mkdir -p /usr/src/
14WORKDIR /usr/src/
15RUN git clone https://github.com/jgm/pandoc
16WORKDIR /usr/src/pandoc
17CMD git pull && \
18 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 && \
28 bash linux/make_deb.sh && \
29 bash linux/make_tarball.sh