-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathtest.dockerfile
28 lines (22 loc) · 1 KB
/
test.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
ARG PYTHON_VERSION=3.9
FROM python:${PYTHON_VERSION}-alpine as host
# set environment for @mermaid-js/mermaid-cli
# https://github.com/mermaid-js/mermaid-cli/blob/master/Dockerfile
ENV CHROME_BIN="/usr/bin/chromium-browser" \
PUPPETEER_SKIP_DOWNLOAD="true"
# install dependencies for @mermaid-js/mermaid-cli
# https://github.com/mermaid-js/mermaid-cli/blob/master/install-dependencies.sh
RUN apk add chromium font-noto-cjk font-noto-emoji terminus-font ttf-dejavu ttf-freefont ttf-font-awesome ttf-inconsolata ttf-linux-libertine \
&& fc-cache -f
RUN apk add --update nodejs npm
RUN addgroup md2conf && adduser -D -G md2conf md2conf
USER md2conf
WORKDIR /home/md2conf
RUN npm install @mermaid-js/mermaid-cli
FROM host as runner
COPY dist/*.whl dist/
RUN python3 -m pip install `ls -1 dist/*.whl`
COPY --chown=md2conf:md2conf sample/ sample/
COPY --chown=md2conf:md2conf tests/*.py tests/
COPY --chown=md2conf:md2conf tests/source/*.md tests/source/
COPY --chown=md2conf:md2conf tests/target/*.xml tests/target/