forked from kerhac/plantuml-markdown-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (32 loc) · 1.06 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
FROM busybox as builder
RUN wget https://sindresorhus.com/github-markdown-css/github-markdown.css
COPY wrap_end_1.html .
COPY wrap_end_2.html .
RUN cat wrap_end_1.html github-markdown.css wrap_end_2.html > /wrap_end.html
FROM python:3.9-alpine
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /tini
RUN chmod +rx /tini
ENTRYPOINT ["/tini", "--"]
RUN mkdir -p /app
WORKDIR /app
ENV PLANTUML_VERSION 1.2021.10
ADD https://oss.sonatype.org/content/repositories/releases/net/sourceforge/plantuml/plantuml/${PLANTUML_VERSION}/plantuml-${PLANTUML_VERSION}.jar /app/plantuml.jar
RUN apk add --no-cache \
bash \
html-xml-utils \
graphviz \
openjdk8-jre \
ttf-droid \
ttf-droid-nonlatin \
&& echo -e '#!/usr/bin/env sh \njava -jar /app/plantuml.jar "${@}"' >> /usr/local/bin/plantuml \
&& chmod +x /usr/local/bin/plantuml \
&& pip install \
markdown \
py-gfm \
plantuml-markdown \
six
COPY wrap_begin.html .
COPY --from=builder /wrap_end.html .
COPY md2html .
CMD ["./md2html"]