Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ WORKDIR /app
COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt && \
apt-get update && apt-get install -y --no-install-recommends curl gosu && \
# Drop pip/setuptools from the runtime image: not needed to run the app, and
# setuptools vendors jaraco.context which trips vulnerability scanners.
pip uninstall -y pip setuptools && \
# curl is for the HEALTHCHECK. gosu is intentionally omitted — entrypoint.sh
# uses setpriv (util-linux) to avoid pulling in a Go binary.
apt-get update && apt-get install -y --no-install-recommends curl && \
rm -rf /var/lib/apt/lists/*

# Labels
Expand Down
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ set -e
mkdir -p /app/data
chown -R proxui:proxui /app/data

exec gosu proxui "$@"
# Drop from root to the proxui user with setpriv (util-linux, already in the
# base image) instead of gosu, which is a static Go binary that drags Go stdlib
# CVEs into vulnerability scans despite not using those code paths.
exec setpriv --reuid proxui --regid proxui --init-groups "$@"
Loading