mirror of
https://github.com/ldericher/autodoc.git
synced 2025-12-06 15:43:01 +00:00
57 lines
1.4 KiB
Docker
57 lines
1.4 KiB
Docker
FROM pandoc/extra:latest AS stage-base
|
|
|
|
RUN set -ex; \
|
|
\
|
|
apk add --no-cache \
|
|
bash \
|
|
ghostscript \
|
|
inotify-tools \
|
|
make \
|
|
patch \
|
|
; \
|
|
\
|
|
tlmgr update --self; \
|
|
\
|
|
tlmgr install \
|
|
kpfonts \
|
|
lastpage \
|
|
latexmk \
|
|
twemojis \
|
|
;
|
|
|
|
COPY src/usr /usr
|
|
|
|
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;
|
|
|
|
WORKDIR /docs
|
|
ENTRYPOINT ["autodoc"]
|
|
CMD ["-bw"]
|
|
|
|
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;
|