Skip to content
Snippets Groups Projects
Commit b98b4df7 authored by Danylo Vanin (EPAM)'s avatar Danylo Vanin (EPAM) Committed by Oleksandr Kosse (EPAM)
Browse files

[GONRG-10847] Fix GC dockerfile to allow runAsNonRoot rule in k8s

parent abe21513
No related branches found
No related tags found
1 merge request!554[GONRG-10847] Fix GC dockerfile to allow runAsNonRoot rule in k8s
......@@ -15,9 +15,11 @@ COPY ./app /opt
RUN pip install --no-cache-dir --upgrade -r /opt/requirements.txt
RUN pip install setuptools==75.7.0 --upgrade
# Run as user
RUN addgroup -S nonroot \
&& adduser -D nonroot -G nonroot
USER nonroot
# Create non-root user/group with numeric UID/GID
RUN addgroup -g 10001 -S nonroot && \
adduser -u 10001 -S nonroot -G nonroot
# Use numeric UID explicitly
USER 10001
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--workers", "4", "--proxy-headers"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment