docker-mdbook/Dockerfile

42 lines
1.3 KiB
Docker
Raw Normal View History

2023-08-10 16:36:59 +02:00
####################
# - Stage: Dependencies
####################
2023-08-13 04:42:53 +02:00
FROM docker.io/rust:1-slim-bookworm AS base
2023-08-10 16:36:59 +02:00
ENV CARGO_INSTALL_ROOT /usr/local/
ENV CARGO_TARGET_DIR /tmp/target/
RUN \
--mount=type=cache,target=/var/cache/apt \
apt update && \
apt install -y libssl-dev pkg-config ca-certificates build-essential make perl gcc libc6-dev
ARG MDBOOK_VERSION="0.4.34"
RUN \
--mount=type=cache,target=/tmp/target/ \
cargo install mdbook --vers ${MDBOOK_VERSION} --verbose
#ARG MDBOOK_LINKCHECK_VERSION="0.7.7"
#ARG MDBOOK_MERMAID_VERSION="0.12.6"
#ARG MDBOOK_KATEX_VERSION="0.5.6"
#ARG MDBOOK_ADMONISH="1.10.1"
#ARG MDBOOK_QUIZ="0.2.14"
#ARG MDBOOK_OPEN_GIT_REPO="0.0.4"
#RUN \
# --mount=type=cache,target=/tmp/target/ \
# cargo install mdbook-linkcheck --vers ${MDBOOK_LINKCHECK_VERSION} --verbose && \
# cargo install mdbook-mermaid --vers ${MDBOOK_MERMAID_VERSION} --verbose && \
# cargo install mdbook-katex --vers ${MDBOOK_KATEX_VERSION} --verbose && \
# cargo install mdbook-admonish --vers ${MDBOOK_ADMONISH} --verbose && \
# cargo install mdbook-quiz --vers ${MDBOOK_QUIZ} --verbose && \
# cargo install mdbook-open-git-repo --vers ${MDBOOK_OPEN_GIT_REPO} --verbose
#ARG MDBOOK_TOC_VERSION="0.14.0"
#RUN cargo install mdbook-toc --vers ${MDBOOK_TOC_VERSION} --verbose
## TODO:
# - i18n: https://crates.io/crates/mdbook-i18n-helpers
ENTRYPOINT []
CMD []