Make release image UID setup base compatible

This commit is contained in:
2026-08-03 06:49:19 +00:00
parent ea35ba2758
commit c717aea394
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -11,8 +11,12 @@ CMD ["python", "-m", "unittest", "discover", "-s", "tests", "-v"]
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
RUN groupadd --gid 1001 archive-control \
&& useradd --uid 1001 --gid 1001 --no-create-home archive-control
RUN if ! getent group 1001 >/dev/null; then \
groupadd --gid 1001 archive-control; \
fi \
&& if ! getent passwd 1001 >/dev/null; then \
useradd --uid 1001 --gid 1001 --no-create-home archive-control; \
fi
COPY --from=builder /wheels /wheels
RUN pip install --no-cache-dir /wheels/*.whl && rm -rf /wheels
USER 1001:1001