@@ -9,10 +9,13 @@ RUN apk update
99RUN apk add alpine-sdk git ca-certificates ghc cabal stack zlib-dev
1010RUN stack update
1111RUN stack config set system-ghc --global true
12−ADD ./ /usr/src/
12+RUN mkdir -p /etc/stack
13+RUN echo "build: { split-objs: true }" > /etc/stack/config.yaml
14+RUN mkdir -p /usr/src/
1315WORKDIR /usr/src/
1416RUN git clone https://github.com/jgm/pandoc
1517WORKDIR /usr/src/pandoc
18+RUN stack install --local-bin-path /usr/bin hsb2hs
19+RUN stack install --only-dependencies --flag 'pandoc:embed_data_files' --test --ghc-options '-O2 -optc-Os -optl-static -fPIC'
1620CMD git pull
17−CMD stack install --local-bin-path /usr/bin hsb2hs
18−CMD stack install --local-bin-path /artifacts --flag 'pandoc:embed_data_files' --test --ghc-options '-optl-static -fPIC'
21+CMD stack install --local-bin-path /artifacts --flag 'pandoc:embed_data_files' --test --ghc-options '-O2 -optc-Os -optl-static -fPIC'