Skip to content

Commit 55fb2e3

Browse files
committed
Merge branch 'master' of github.com:squidfunk/mkdocs-material
2 parents d9572f6 + 2577640 commit 55fb2e3

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ WORKDIR /tmp
3434
COPY material material
3535
COPY package.json package.json
3636
COPY README.md README.md
37-
COPY requirements.txt requirements.txt
37+
COPY *requirements.txt ./
3838
COPY pyproject.toml pyproject.toml
3939

4040
# Perform build and cleanup artifacts and caches
@@ -66,6 +66,10 @@ RUN \
6666
"pillow>=9.0" \
6767
"cairosvg>=2.5"; \
6868
fi \
69+
&& \
70+
if [ -e user-requirements.txt ]; then \
71+
pip install -U -r user-requirements.txt; \
72+
fi \
6973
&& \
7074
apk del .build \
7175
&& \

docs/getting-started.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,12 @@ The following plugins are bundled with the Docker image:
117117

118118
Material for MkDocs only bundles selected plugins in order to keep the size
119119
of the official image small. If the plugin you want to use is not included,
120-
create a new `Dockerfile` and extend the official Docker image:
120+
create a `user-requirements.txt` file in the repository root with the packages
121+
you want to install additionally, e.g.:
121122

122-
``` Dockerfile
123-
FROM squidfunk/mkdocs-material
124-
RUN pip install ...
123+
``` txt title="user-requirements.txt"
124+
mkdocs-macros-plugin==0.7.0
125+
mkdocs-glightbox>=0.3.1
125126
```
126127

127128
Next, you can build the image with the following command:
@@ -130,7 +131,8 @@ The following plugins are bundled with the Docker image:
130131
docker build -t squidfunk/mkdocs-material .
131132
```
132133

133-
The new image can be used exactly like the official image.
134+
The new image will have additional packages installed and can be used
135+
exactly like the official image.
134136

135137
### with git
136138

docs/insiders/getting-started.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ docker login -u ${GH_USERNAME} -p ${GHCR_TOKEN} ghcr.io
7979
docker pull ghcr.io/${GH_USERNAME}/mkdocs-material-insiders
8080
```
8181

82+
Should you wish to add additional plugins to the insiders container image, follow the steps
83+
outlined in the [Getting Started guide](../getting-started.md#with-docker).
84+
8285
[^2]:
8386
Earlier, Insiders provided a dedicated Docker image which was available to
8487
all sponsors. On March 21, 2021, the image was deprecated for the reasons

0 commit comments

Comments
 (0)