forked from asciidoctor/docker-asciidoctor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
139 lines (121 loc) · 3.82 KB
/
Dockerfile
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
FROM alpine:3.13 AS base
ARG asciidoctor_version=2.0.12
ARG asciidoctor_confluence_version=0.0.2
ARG asciidoctor_pdf_version=1.5.4
ARG asciidoctor_diagram_version=2.1.0
ARG asciidoctor_epub3_version=1.5.0.alpha.19
ARG asciidoctor_mathematical_version=0.3.5
ARG asciidoctor_revealjs_version=4.1.0
ARG kramdown_asciidoc_version=1.0.1
ARG asciidoctor_bibtex_version=0.8.0
ENV ASCIIDOCTOR_VERSION=${asciidoctor_version} \
ASCIIDOCTOR_CONFLUENCE_VERSION=${asciidoctor_confluence_version} \
ASCIIDOCTOR_PDF_VERSION=${asciidoctor_pdf_version} \
ASCIIDOCTOR_DIAGRAM_VERSION=${asciidoctor_diagram_version} \
ASCIIDOCTOR_EPUB3_VERSION=${asciidoctor_epub3_version} \
ASCIIDOCTOR_MATHEMATICAL_VERSION=${asciidoctor_mathematical_version} \
ASCIIDOCTOR_REVEALJS_VERSION=${asciidoctor_revealjs_version} \
KRAMDOWN_ASCIIDOC_VERSION=${kramdown_asciidoc_version} \
ASCIIDOCTOR_BIBTEX_VERSION=${asciidoctor_bibtex_version} \
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Haskell build for: erd
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
FROM base AS build-haskell
RUN echo "building Haskell dependencies" # keep here to help --cache-from along
RUN apk add --no-cache \
alpine-sdk \
cabal \
ghc-dev \
ghc \
gmp-dev \
gnupg \
libffi-dev \
linux-headers \
perl-utils \
wget \
xz \
zlib-dev
RUN cabal v2-update \
&& cabal v2-install erd
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Final image
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
FROM base AS main
RUN echo "building main image" # keep here to help --cache-from along
LABEL MAINTAINERS="Guillaume Scheibel <guillaume.scheibel@gmail.com>, Damien DUPORTAL <damien.duportal@gmail.com>"
# Installing package required for the runtime of
# any of the asciidoctor-* functionnalities
RUN apk add --no-cache \
bash \
curl \
ca-certificates \
chromium \
findutils \
font-bakoma-ttf \
git \
graphviz \
inotify-tools \
make \
openjdk8-jre \
python3 \
py3-pillow \
py3-setuptools \
ruby \
ruby-bigdecimal \
ruby-mathematical \
ruby-rake \
ttf-liberation \
ttf-dejavu \
tzdata \
unzip \
which
# Installing Ruby Gems needed in the image
# including asciidoctor itself
RUN apk add --no-cache --virtual .rubymakedepends \
build-base \
libxml2-dev \
ruby-dev \
&& gem install --no-document \
"asciidoctor:${ASCIIDOCTOR_VERSION}" \
"asciidoctor-confluence:${ASCIIDOCTOR_CONFLUENCE_VERSION}" \
"asciidoctor-diagram:${ASCIIDOCTOR_DIAGRAM_VERSION}" \
"asciidoctor-epub3:${ASCIIDOCTOR_EPUB3_VERSION}" \
"asciidoctor-mathematical:${ASCIIDOCTOR_MATHEMATICAL_VERSION}" \
asciimath \
"asciidoctor-pdf:${ASCIIDOCTOR_PDF_VERSION}" \
"asciidoctor-revealjs:${ASCIIDOCTOR_REVEALJS_VERSION}" \
coderay \
epubcheck-ruby:4.2.4.0 \
haml \
"kramdown-asciidoc:${KRAMDOWN_ASCIIDOC_VERSION}" \
pygments.rb \
rouge \
slim \
thread_safe \
tilt \
text-hyphen \
"asciidoctor-bibtex:${ASCIIDOCTOR_BIBTEX_VERSION}" \
&& apk del -r --no-cache .rubymakedepends
## Install BPMN-JS-CMD (along with pupeeter and Chromium)
RUN apk add --no-cache npm \
&& cd /root \
&& npm install bpmn-js-cmd
ENV PATH="${PATH}:/root/node_modules/.bin"
# Installing Python dependencies for additional
# functionnalities as diagrams or syntax highligthing
RUN apk add --no-cache --virtual .pythonmakedepends \
build-base \
python3-dev \
py3-pip \
&& pip3 install --no-cache-dir \
actdiag \
'blockdiag[pdf]' \
nwdiag \
seqdiag \
&& apk del -r --no-cache .pythonmakedepends
COPY --from=build-haskell root/.cabal/bin/erd /bin/
WORKDIR /documents
VOLUME /documents
CMD ["/bin/bash"]