@@ -9,10 +9,13 @@ RUN apk update
9RUN apk add alpine-sdk git ca-certificates ghc cabal stack zlib-dev
9RUN apk add alpine-sdk git ca-certificates ghc cabal stack zlib-dev
10RUN stack update
10RUN stack update
11RUN stack config set system-ghc --global true
11RUN stack config set system-ghc --global true
12+RUN mkdir -p /etc/stack
13+RUN echo "build: { split-objs: true }" > /etc/stack/config.yaml
12−ADD ./ /usr/src/
14+RUN mkdir -p /usr/src/
13WORKDIR /usr/src/
15WORKDIR /usr/src/
14RUN git clone https://github.com/jgm/pandoc
16RUN git clone https://github.com/jgm/pandoc
15WORKDIR /usr/src/pandoc
17WORKDIR /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'
16CMD git pull
20CMD 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'