2024-11-18 19:16:36 +00:00
|
|
|
FROM pandoc/extra:latest-ubuntu AS stage-base
|
|
|
|
|
|
|
|
|
|
RUN set -ex; \
|
|
|
|
|
\
|
|
|
|
|
deluser --remove-home ubuntu; \
|
|
|
|
|
\
|
2024-11-18 23:24:09 +00:00
|
|
|
apt-get update; apt-get install --no-install-recommends --yes \
|
2024-11-18 19:16:36 +00:00
|
|
|
ghostscript \
|
|
|
|
|
inotify-tools \
|
|
|
|
|
make \
|
2025-10-02 12:08:17 +00:00
|
|
|
patch \
|
2024-11-18 19:16:36 +00:00
|
|
|
; rm -rf /var/lib/apt/lists/*; \
|
|
|
|
|
\
|
2025-05-06 10:33:23 +00:00
|
|
|
tlmgr update --self; \
|
|
|
|
|
\
|
2024-11-18 19:16:36 +00:00
|
|
|
tlmgr install \
|
|
|
|
|
kpfonts \
|
|
|
|
|
lastpage \
|
|
|
|
|
latexmk \
|
2024-11-22 16:48:49 +00:00
|
|
|
twemojis \
|
2024-11-18 19:16:36 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
|
|
COPY src/usr /usr
|
|
|
|
|
|
2025-10-02 12:08:17 +00:00
|
|
|
RUN set -ex; \
|
|
|
|
|
\
|
|
|
|
|
cp /usr/share/ghostscript/10.02.1/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-11-18 19:16:36 +00:00
|
|
|
WORKDIR /docs
|
|
|
|
|
ENTRYPOINT ["autodoc"]
|
|
|
|
|
CMD ["-bw"]
|
|
|
|
|
|
2024-11-18 23:24:09 +00:00
|
|
|
FROM stage-base AS stage-diagram
|
|
|
|
|
|
|
|
|
|
ENV PUPPETEER_CACHE_DIR="/usr/local/share/puppeteer/cache"
|
|
|
|
|
|
|
|
|
|
COPY src/diagram.lua.patch /usr/local/src/autodoc/diagram.lua.patch
|
2024-11-18 19:16:36 +00:00
|
|
|
|
|
|
|
|
RUN set -ex; \
|
|
|
|
|
\
|
2024-11-18 23:24:09 +00:00
|
|
|
apt-get update; apt-get install --no-install-recommends --yes \
|
2024-11-18 22:33:28 +00:00
|
|
|
libasound2t64 \
|
|
|
|
|
libatk1.0-0t64 \
|
|
|
|
|
libatk-bridge2.0-0t64 \
|
|
|
|
|
libgbm1 \
|
|
|
|
|
libnss3 \
|
|
|
|
|
libxcomposite1 \
|
|
|
|
|
libxdamage1 \
|
|
|
|
|
libxfixes3 \
|
|
|
|
|
libxkbcommon0 \
|
|
|
|
|
libxrandr2 \
|
2024-11-18 19:16:36 +00:00
|
|
|
npm \
|
|
|
|
|
; rm -rf /var/lib/apt/lists/*; \
|
|
|
|
|
\
|
|
|
|
|
npm install --global @mermaid-js/mermaid-cli; \
|
|
|
|
|
\
|
|
|
|
|
wget \
|
|
|
|
|
--output-document='/usr/local/share/pandoc/filters/diagram.lua' \
|
|
|
|
|
'https://raw.githubusercontent.com/pandoc-ext/diagram/refs/heads/main/_extensions/diagram/diagram.lua' \
|
2024-11-18 23:24:09 +00:00
|
|
|
; \
|
|
|
|
|
patch /usr/local/share/pandoc/filters/diagram.lua < /usr/local/src/autodoc/diagram.lua.patch; \
|
|
|
|
|
rm /usr/local/src/autodoc/diagram.lua.patch;
|