chore: add GID/UID comment

...
This commit is contained in:
Javier Martinez 2024-07-29 15:05:44 +02:00
parent 00d918ad08
commit 1a23612c21
No known key found for this signature in database
2 changed files with 18 additions and 0 deletions

View file

@ -24,8 +24,17 @@ ENV PYTHONPATH="$PYTHONPATH:/home/worker/app/private_gpt/"
EXPOSE 8080 EXPOSE 8080
# Prepare a non-root user # Prepare a non-root user
# More info about how to configure UIDs and GIDs in Docker:
# https://github.com/systemd/systemd/blob/main/docs/UIDS-GIDS.md
# Define the User ID (UID) for the non-root user
# UID 100 is chosen to avoid conflicts with existing system users
ARG UID=100 ARG UID=100
# Define the Group ID (GID) for the non-root user
# GID 65534 is often used for the 'nogroup' or 'nobody' group
ARG GID=65534 ARG GID=65534
RUN adduser --system --gid ${GID} --uid ${UID} --home /home/worker worker RUN adduser --system --gid ${GID} --uid ${UID} --home /home/worker worker
WORKDIR /home/worker/app WORKDIR /home/worker/app

View file

@ -35,8 +35,17 @@ ENV PYTHONPATH="$PYTHONPATH:/home/worker/app/private_gpt/"
EXPOSE 8080 EXPOSE 8080
# Prepare a non-root user # Prepare a non-root user
# More info about how to configure UIDs and GIDs in Docker:
# https://github.com/systemd/systemd/blob/main/docs/UIDS-GIDS.md
# Define the User ID (UID) for the non-root user
# UID 100 is chosen to avoid conflicts with existing system users
ARG UID=100 ARG UID=100
# Define the Group ID (GID) for the non-root user
# GID 65534 is often used for the 'nogroup' or 'nobody' group
ARG GID=65534 ARG GID=65534
RUN adduser --system --gid ${GID} --uid ${UID} --home /home/worker worker RUN adduser --system --gid ${GID} --uid ${UID} --home /home/worker worker
WORKDIR /home/worker/app WORKDIR /home/worker/app