diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2017-12-28 09:25:01 -0800 | 
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-28 09:25:01 -0800 | 
| commit | 999dd2a2393d750c96091e0d0aaf75cbb8e5e4df (patch) | |
| tree | 5ea4ac8132fb165706f1ac04266ec78bbdc00881 /linux | |
| parent | 2dd01b207170f30b7f6f2306c98e10ac14923c5e (diff) | |
| download | pandoc-999dd2a2393d750c96091e0d0aaf75cbb8e5e4df.tar.gz | |
linux package build: use stack lts-9.
Also break up the build into three chunks for better
cacheability.
Diffstat (limited to 'linux')
| -rw-r--r-- | linux/Dockerfile | 27 | 
1 files changed, 22 insertions, 5 deletions
| diff --git a/linux/Dockerfile b/linux/Dockerfile index 21c60338f..40d37d13d 100644 --- a/linux/Dockerfile +++ b/linux/Dockerfile @@ -7,15 +7,32 @@ RUN apk update  RUN apk add alpine-sdk git ca-certificates ghc cabal stack zlib-dev \      dpkg fakeroot sed gawk grep bash linux-headers  RUN stack update -RUN stack upgrade -RUN $HOME/.local/bin/stack config set system-ghc --global true +RUN stack config set system-ghc --global true  #RUN mkdir -p /etc/stack  #RUN echo "build: { split-objs: true }" > /etc/stack/config.yaml  RUN mkdir -p /usr/src/  WORKDIR /usr/src/ -RUN git clone https://github.com/jgm/pandoc +RUN git  clone https://github.com/jgm/pandoc  WORKDIR /usr/src/pandoc -RUN $HOME/.local/bin/stack install --compiler 'ghc-8.0.2' \ +RUN stack install --stack-yaml stack.lts9.yaml \ +    --only-dependencies \ +    --flag 'pandoc:static' \ +    --flag 'pandoc:embed_data_files' \ +    --flag 'pandoc-citeproc:static' \ +    --flag 'pandoc-citeproc:embed_data_files' \ +    --flag 'hslua:-export-dynamic' \ +    --ghc-options '-O2 -optc-Os -optl=-pthread -optl=-static -fPIC' \ +    aeson +RUN stack install --stack-yaml stack.lts9.yaml \ +    --only-dependencies \ +    --flag 'pandoc:static' \ +    --flag 'pandoc:embed_data_files' \ +    --flag 'pandoc-citeproc:static' \ +    --flag 'pandoc-citeproc:embed_data_files' \ +    --flag 'hslua:-export-dynamic' \ +    --ghc-options '-O2 -optc-Os -optl=-pthread -optl=-static -fPIC' \ +    http-client-tls +RUN stack install --stack-yaml stack.lts9.yaml \      --only-dependencies \      --flag 'pandoc:static' \      --flag 'pandoc:embed_data_files' \ @@ -26,7 +43,7 @@ RUN $HOME/.local/bin/stack install --compiler 'ghc-8.0.2' \      pandoc pandoc-citeproc  CMD git pull && \      git checkout -b work $TREE && \ -    $HOME/.local/bin/stack install --compiler 'ghc-8.0.2' \ +    stack install --stack-yaml stack.lts9.yaml \        --flag 'pandoc:static' \        --flag 'pandoc:embed_data_files' \        --flag 'pandoc-citeproc:static' \ | 
