From 64e9a496f604ebfa1fb2ce740b0379993ca8fd96 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Tue, 5 Jan 2021 19:29:48 +0100 Subject: [PATCH] Fixed Docker image for default themes --- Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cd65e39dd..b2a61aa54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,9 @@ FROM python:3.8.1-alpine3.11 # Build-time flags ARG WITH_PLUGINS=true +# Packages directory +ENV PACKAGES=/usr/local/lib/python3.8/site-packages + # Set build directory WORKDIR /tmp @@ -49,7 +52,13 @@ RUN \ 'mkdocs-redirects>=1.0'; \ fi \ && apk del .build gcc musl-dev \ - && rm -rf /usr/local/lib/python3.8/site-packages/mkdocs/themes/*/* \ + && \ + for theme in mkdocs readthedocs; do \ + rm -rf ${PACKAGES}/mkdocs/themes/$theme; \ + ln -s \ + ${PACKAGES}/material \ + ${PACKAGES}/mkdocs/themes/$theme; \ + done \ && rm -rf /tmp/* # Set working directory