diff --git a/wiki-docs/Dockerfile b/wiki-docs/Dockerfile index 94837a4b2b..bb63d18a2a 100755 --- a/wiki-docs/Dockerfile +++ b/wiki-docs/Dockerfile @@ -1,12 +1,15 @@ FROM python:3.9-alpine -RUN apk update -RUN apk add rsync -RUN apk add git -RUN apk add nodejs npm +# Install system dependencies +RUN apk update && \ + apk add --no-cache rsync git nodejs npm && \ + rm -rf /var/cache/apk/* + +# Copy and install Python dependencies COPY requirements.txt requirements.txt RUN pip install -r requirements.txt --no-cache-dir +# Switch to a non-root user (if 'nonroot' is already created) USER nonroot # Build doc by default