UID and GID build arguments for worker user

This commit is contained in:
Quentin McGaw
2024-03-25 11:06:04 +00:00
parent 9d0d614706
commit cc24016169
2 changed files with 6 additions and 3 deletions

View File

@@ -23,7 +23,9 @@ ENV PORT=8080
EXPOSE 8080
# Prepare a non-root user
RUN adduser --system worker
ARG UID=100
ARG GID=65534
RUN adduser --system --uid ${UID} --gid ${GID} worker
WORKDIR /home/worker/app
RUN mkdir local_data; chown worker local_data

View File

@@ -33,8 +33,9 @@ ENV PORT=8080
EXPOSE 8080
# Prepare a non-root user
RUN adduser --group worker
RUN adduser --system --ingroup worker worker
ARG UID=100
ARG GID=65534
RUN adduser --system --gid ${GID} --uid ${UID} worker
WORKDIR /home/worker/app
RUN mkdir local_data; chown worker local_data