Introduces distinct Dockerfiles for documentation and slide projects, enhancing modularity and build efficiency. The previous monolithic structure was less flexible and caused longer build times. - Added `DOCMACHINE_DOCS_ENABLE` and `DOCMACHINE_SLIDES_ENABLE` env variables to toggle features. - Created `docker/Dockerfile.docs` for documentation builds, including necessary tools and dependencies. - Created `docker/Dockerfile.slides` for slide builds to streamline setup. - Updated main Dockerfile to include `python-is-python3` for compatibility, removing redundant symlinks. - Enhanced LaTeX tools by adding `texlive-xetex` and extra fonts for improved PDF output.
44 lines
1.2 KiB
Text
44 lines
1.2 KiB
Text
FROM node:18-bookworm-slim
|
|
LABEL maintainer="Glenn ROLLAND glenux@glenux.net"
|
|
|
|
# RUN apt-get update \
|
|
# && apt-get install -y --no-install-recommends python3 python3-pip pipenv python3-pypandoc \
|
|
# && apt-get clean \
|
|
# && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
|
# && truncate -s 0 /var/log/*log
|
|
|
|
# # Tools for running the common parts
|
|
# RUN apt-get update \
|
|
# && apt-get install -y --no-install-recommends make build-essential inotify-tools gosu unzip curl rsync \
|
|
# && apt-get clean \
|
|
# && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
|
# && truncate -s 0 /var/log/*log
|
|
|
|
# Tools for building pdfs
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends make m4 chromium \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
|
&& truncate -s 0 /var/log/*log
|
|
|
|
# External tools
|
|
# yq => manage YML
|
|
RUN curl -sSL -o /usr/local/bin/yq \
|
|
https://github.com/mikefarah/yq/releases/download/v4.44.6/yq_linux_amd64 \
|
|
&& chmod +x /usr/local/bin/yq
|
|
|
|
COPY . /app
|
|
COPY .marp /app/.marp
|
|
WORKDIR /app
|
|
|
|
ENV LANG=C.UTF-8 \
|
|
LC_ALL=C.UTF-8 \
|
|
PIPENV_HIDE_EMOJIS=1 \
|
|
PIPENV_VENV_IN_PROJECT=1
|
|
|
|
RUN ln -sf /usr/bin/python3 /usr/bin/python \
|
|
&& make prepare SYSTEM_INSTALL=1
|
|
|
|
ENTRYPOINT ["/app/docker/entrypoint.sh"]
|
|
CMD ["watch"]
|
|
|