2017-10-23 00:04:49 +02:00
|
|
|
# USE ALPINE LINUX
|
2018-04-24 07:43:10 +02:00
|
|
|
FROM alpine
|
|
|
|
RUN apk update
|
|
|
|
RUN apk add alpine-sdk git ca-certificates ghc gmp-dev zlib-dev bash dpkg fakeroot
|
|
|
|
# GRAB A RECENT BINARY OF STACK
|
2018-11-04 04:56:39 +01:00
|
|
|
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
|
2018-10-18 19:31:16 +02:00
|
|
|
RUN cp stack-1.9.1-linux-x86_64-static/stack /usr/local/bin/stack
|
2018-09-17 04:42:08 +02:00
|
|
|
RUN chmod +x /usr/local/bin/stack
|
2018-05-11 20:46:39 +02:00
|
|
|
ENV PATH="/usr/local/bin:${PATH}"
|
2018-04-24 07:43:10 +02:00
|
|
|
RUN ulimit -n 4096
|
2017-12-28 18:25:01 +01:00
|
|
|
RUN stack config set system-ghc --global true
|
2018-07-16 05:25:54 +02:00
|
|
|
RUN stack setup --resolver lts-12
|
2017-03-19 16:24:52 +01:00
|
|
|
RUN mkdir -p /usr/src/
|
|
|
|
WORKDIR /usr/src/
|
2018-04-24 07:43:10 +02:00
|
|
|
RUN git clone https://github.com/jgm/pandoc
|
2017-03-19 16:24:52 +01:00
|
|
|
WORKDIR /usr/src/pandoc
|
|
|
|
CMD git pull && \
|
|
|
|
git checkout -b work $TREE && \
|
2018-07-16 05:25:54 +02:00
|
|
|
stack install \
|
2017-10-23 00:04:49 +02:00
|
|
|
--flag 'pandoc:static' \
|
|
|
|
--flag 'pandoc:embed_data_files' \
|
2017-10-30 22:28:21 +01:00
|
|
|
--flag 'pandoc-citeproc:static' \
|
|
|
|
--flag 'pandoc-citeproc:embed_data_files' \
|
2017-10-23 00:04:49 +02:00
|
|
|
--flag 'hslua:-export-dynamic' \
|
|
|
|
--ghc-options '-O2 -optc-Os -optl=-pthread -optl=-static -fPIC' \
|
|
|
|
--local-bin-path /artifacts \
|
|
|
|
pandoc pandoc-citeproc && \
|
|
|
|
bash linux/make_deb.sh && \
|
|
|
|
bash linux/make_tarball.sh
|