autodoc/Dockerfile.ubuntu

57 lines
1.3 KiB
Docker
Raw Normal View History

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 \
; rm -rf /var/lib/apt/lists/*; \
\
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
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 \
libasound2t64 \
libatk1.0-0t64 \
libatk-bridge2.0-0t64 \
libgbm1 \
libnss3 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxkbcommon0 \
libxrandr2 \
2024-11-18 19:16:36 +00:00
npm \
2024-11-18 23:24:09 +00:00
patch \
2024-11-18 19:16:36 +00:00
; 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;