fix(ci): resolve security findings and improve Trivy reporting

This commit is contained in:
TakuyaYagam1 committed 2026-10-05 17:30:21 +03:00
1 parent 138666a7bb
commit e9f56a6aa2
9 files changed
+110 -12

No files matched your search

+8 -3
View File
@@ -1,4 +1,6 @@
FROM python:slim AS base
FROM python:alpine AS base
RUN apk upgrade --no-cache
FROM base AS build
@@ -21,8 +23,11 @@ ENV PATH="/opt/venv/bin:${PATH}" \
PYTHONUNBUFFERED=1
WORKDIR /app
RUN groupadd --system --gid 10001 lincodex \
&& useradd --system --uid 10001 --gid lincodex --no-create-home lincodex
# Package installation belongs to the build stage, not the service runtime.
RUN python -m pip uninstall --yes pip \
&& python -c "import ensurepip, shutil; shutil.rmtree(ensurepip.__path__[0])" \
&& addgroup -S -g 10001 lincodex \
&& adduser -S -D -H -u 10001 -G lincodex lincodex
COPY --from=build --chown=lincodex:lincodex /opt/venv /opt/venv