~ajhalili2006's personal website, built with Zensical (successor of Material for Mkdocs) [old repo name got bugged while attempting to do manual knot migration via repo deletion] andreijiroh.dev
zensical mkdocs-material website
1# syntax=docker/dockerfile:1 2# Instead of using Alpine base image and then installing Python from pkgs.al.o, 3# we'll go with the official images instead. 4FROM python:3.12-alpine AS buildkit 5 6# Since hadolint isn't in the package repos for Alpine yet, we'll copying from the offical 7# Docker image instead. 8COPY --from=ghcr.io/hadolint/hadolint:latest-alpine /bin/hadolint /usr/bin/hadolint 9 10ENV PACKAGES=/usr/local/lib/python3.11/site-packages PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin PYTHONDONTWRITEBYTECODE=1 11LABEL org.opencontainers.image.description="GitLab CI image for custom mkdocs-material Docker image, alongside tools @ajhalili2006 use." 12 13# https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#linux but for Alpine 14# Also installs Doppler CLI for accessing secrets securely within CI 15# hadolint ignore=DL3018,DL3013 16RUN apk add --no-cache \ 17 cairo-dev \ 18 freetype-dev \ 19 libffi-dev \ 20 jpeg-dev \ 21 libpng-dev \ 22 zlib-dev \ 23 bash \ 24 coreutils \ 25 shellcheck \ 26 gcc \ 27 libffi-dev \ 28 musl-dev \ 29 nodejs \ 30 npm \ 31 yarn \ 32 git \ 33 git-email \ 34 git-lfs \ 35 git-fast-import \ 36 openssh \ 37 gnupg \ 38 curl \ 39 rsync \ 40 && curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh \ 41 | sh 42 43# See https://www.jeffgeerling.com/blog/2023/how-solve-error-externally-managed-environment-when-installing-pip3 44# for context behind removing the EXTERNALLY-MANAGED file on distribution-built CPython binary releases 45RUN pip install --no-cache \ 46 mkdocs-material \ 47 mkdocs-git-committers-plugin-2 \ 48 mkdocs-git-revision-date-localized-plugin \ 49 mkdocs-minify-plugin \ 50 mkdocs-redirects \ 51 mkdocs-rss-plugin \ 52 pillow \ 53 cairosvg \ 54 pipenv \ 55 pipx \ 56 && npm install -g corepack \ 57 && corepack enable 58 59# Trust directory, required for git >= 2.35.2 60# Follows the docs for the Docker-based site build setup 61RUN git config --global --add safe.directory /docs &&\ 62 git config --global --add safe.directory /site 63 64# Expose MkDocs development server port 65EXPOSE 8000 66 67WORKDIR /docs 68 69#COPY entrypoint.sh /usr/local/bin/entrypoint 70CMD [ "mkdocs", "serve", "--dev-addr=0.0.0.0:8000" ]