diff --git a/build/gc/Dockerfile b/build/gc/Dockerfile index b05df2ed3f350e73780afe15d76d8792d91f9f3e..40e48f257e3d08eeab0f1c367067a34efc921235 100644 --- a/build/gc/Dockerfile +++ b/build/gc/Dockerfile @@ -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"]