-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.pandoc
57 lines (47 loc) · 2.19 KB
/
Dockerfile.pandoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
## Dockerfile for a haskell environment
FROM debian:stretch-20200908
LABEL maintainer="Gordon Young <[email protected]>"
LABEL description="This container enables rendering policy-as-code to human friendly artifacts"
ENV LANG C.UTF-8
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/2.4/bin:/opt/ghc/8.6.3/bin:$PATH
ENV PANDOC_VERSION "2.5"
ENV COMPLY_VERSION "v1.3.7"
ENV HASKELL_STACK_VERSION "1.9.3"
ENV LANG C.UTF-8
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/2.4/bin:/opt/ghc/8.6.3/bin:$PATH
ENV gh_user ''
ENV gh_repo ''
ENV gh_token ''
ENV gh_email ''
RUN apt-get update && \
apt-get install -y --allow-unauthenticated --no-install-recommends gnupg ca-certificates curl git && \
echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \
apt-get update && \
apt-get install -y --allow-unauthenticated --no-install-recommends ghc-8.6.3 cabal-install-2.4 \
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make && \
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v${HASKELL_STACK_VERSION}/stack-${HASKELL_STACK_VERSION}-linux-x86_64.tar.gz -o stack.tar.gz && \
export GNUPGHOME="$(mktemp -d)" && \
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
/usr/local/bin/stack config set system-ghc --global true && \
/usr/local/bin/stack config set install-ghc --global false && \
apt-get install --allow-unauthenticated -y -o Acquire::Retries=10 --no-install-recommends \
texlive-latex-base \
texlive-xetex latex-xcolor \
texlive-math-extra \
texlive-latex-extra \
texlive-fonts-extra \
texlive-bibtex-extra \
fontconfig \
lmodern
# install pandoc
RUN cabal update && cabal install pandoc-${PANDOC_VERSION}
# install StrongDM Comply
RUN curl -fSL https://github.com/strongdm/comply/releases/download/${COMPLY_VERSION}/comply-${COMPLY_VERSION}-linux-amd64.tgz -o comply.tar.gz && \
tar -xf comply.tar.gz -C /usr/local/bin && \
mv /usr/local/bin/comply-${COMPLY_VERSION}-linux-amd64 /usr/local/bin/comply
# Add our own render script
ADD render.sh /usr/local/bin/render.sh
##
WORKDIR /source
# run a command
ENTRYPOINT ["/usr/local/bin/render.sh"]