Skip to content

Commit 6443423

Browse files
authored
build: lock user guide localdev dependencies with hashes (#248)
1 parent 581fd8f commit 6443423

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

docs/user-guide/Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ FROM docker.io/python:3.12.11-alpine@sha256:c610e4a94a0e8b888b4b225bfc0e6b59dee6
66

77
WORKDIR /run
88

9-
# Install MkDocs
10-
RUN pip install mkdocs-material[recommended]
9+
COPY requirements.txt .
1110

12-
# Install MkDocs Git-related features (e.g. revisions, collaborators, ...)
13-
RUN apk add --no-cache git && \
14-
pip install \
15-
mkdocs-git-revision-date-localized-plugin \
16-
mkdocs-git-committers-plugin-2 && \
11+
RUN \
12+
## Install MkDocs and its dependencies
13+
pip install --no-cache-dir --require-hashes --requirement requirements.txt \
14+
&& \
15+
rm requirements.txt \
16+
## Setup prerequisites for MkDocs Git-related features (e.g. revisions, collaborators, ...)
17+
&& \
18+
apk add --no-cache git \
19+
&& \
1720
git config --system --add safe.directory /run
1821

1922
USER daemon

docs/user-guide/mkdocs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ esac
2222

2323
ROOT_PROJECT_DIR="${SCRIPT_DIR}/../.."
2424

25-
echo 'Building Docker image for MkDocs (can take a while)'
25+
echo 'Building Docker image for MkDocs (can take a while - ~1 minutes)'
2626
docker build --progress quiet -t docker-papermc-server/mkdocs "${SCRIPT_DIR}"
2727

2828
echo

0 commit comments

Comments
 (0)