-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
129 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
__pycache__ | ||
/.env | ||
/.envrc | ||
/.idea | ||
/.mypy_cache | ||
/.venv | ||
/*.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
__pycache__ | ||
/.env | ||
/.envrc | ||
/.idea | ||
/.mypy_cache | ||
/.venv | ||
/dist | ||
/*.egg-info | ||
.envrc | ||
.venv | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"executablePath": "/usr/bin/chromium-browser", | ||
"args": [ | ||
"--no-sandbox", | ||
"--disable-gpu", | ||
"--disable-setuid-sandbox" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
ARG PYTHON_VERSION=3.9 | ||
FROM python:${PYTHON_VERSION}-alpine | ||
RUN PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --upgrade pip | ||
|
||
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 sample/ sample/ | ||
COPY tests/*.py tests/ | ||
COPY tests/source/*.md tests/source/ | ||
COPY tests/target/*.xml tests/target/ | ||
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/ |