2024-11-19 00:48:10 +00:00
|
|
|
FROM pandoc/extra:latest AS stage-base
|
2019-09-19 16:11:47 +00:00
|
|
|
|
2021-09-22 21:45:45 +00:00
|
|
|
RUN set -ex; \
|
2024-01-08 16:26:53 +00:00
|
|
|
\
|
|
|
|
|
apk add --no-cache \
|
|
|
|
|
bash \
|
2024-02-29 22:27:06 +00:00
|
|
|
ghostscript \
|
2019-09-19 16:11:47 +00:00
|
|
|
inotify-tools \
|
2024-01-08 16:26:53 +00:00
|
|
|
make \
|
2025-10-02 12:08:17 +00:00
|
|
|
patch \
|
2024-04-22 23:25:21 +00:00
|
|
|
; \
|
|
|
|
|
\
|
2025-05-06 10:33:23 +00:00
|
|
|
tlmgr update --self; \
|
|
|
|
|
\
|
2024-04-22 23:25:21 +00:00
|
|
|
tlmgr install \
|
|
|
|
|
kpfonts \
|
|
|
|
|
lastpage \
|
|
|
|
|
latexmk \
|
2024-11-22 16:48:49 +00:00
|
|
|
twemojis \
|
2024-01-08 16:26:53 +00:00
|
|
|
;
|
2019-09-19 16:11:47 +00:00
|
|
|
|
2024-01-08 17:24:50 +00:00
|
|
|
COPY src/usr /usr
|
2019-09-20 10:30:21 +00:00
|
|
|
|
2025-10-02 12:08:17 +00:00
|
|
|
RUN set -ex; \
|
|
|
|
|
\
|
|
|
|
|
cp /usr/share/ghostscript/lib/PDFA_def.ps /usr/local/share/autodoc/; \
|
|
|
|
|
patch -d /usr/local/share/autodoc < /usr/local/share/autodoc/PDFA_def.ps.patch; \
|
|
|
|
|
rm /usr/local/share/autodoc/PDFA_def.ps.patch;
|
|
|
|
|
|
2024-01-08 21:46:08 +00:00
|
|
|
WORKDIR /docs
|
2024-01-08 17:24:50 +00:00
|
|
|
ENTRYPOINT ["autodoc"]
|
|
|
|
|
CMD ["-bw"]
|
2024-11-19 00:48:10 +00:00
|
|
|
|
|
|
|
|
FROM stage-base AS stage-diagram
|
|
|
|
|
|
|
|
|
|
ENV PUPPETEER_CACHE_DIR="/usr/local/share/puppeteer/cache" \
|
|
|
|
|
PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium-browser" \
|
|
|
|
|
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
|
|
|
|
|
|
|
|
|
|
COPY src/diagram.lua.patch /usr/local/src/autodoc/diagram.lua.patch
|
|
|
|
|
|
|
|
|
|
RUN set -ex; \
|
|
|
|
|
\
|
|
|
|
|
apk add --no-cache \
|
|
|
|
|
chromium \
|
|
|
|
|
npm \
|
|
|
|
|
; \
|
|
|
|
|
\
|
|
|
|
|
npm install --global @mermaid-js/mermaid-cli; \
|
|
|
|
|
# rm -rf /root/.cache/puppeteer; \
|
|
|
|
|
\
|
|
|
|
|
wget \
|
|
|
|
|
--output-document='/usr/local/share/pandoc/filters/diagram.lua' \
|
|
|
|
|
'https://raw.githubusercontent.com/pandoc-ext/diagram/refs/heads/main/_extensions/diagram/diagram.lua' \
|
|
|
|
|
; \
|
|
|
|
|
patch /usr/local/share/pandoc/filters/diagram.lua < /usr/local/src/autodoc/diagram.lua.patch; \
|
|
|
|
|
rm /usr/local/src/autodoc/diagram.lua.patch;
|