Skip to content

Commit 6df501c

Browse files
gojun077rusiaaman
authored andcommitted
Add step to Dockerfile to create 'app:app' user and group
This fixes the following error during `docker build`: ``` [2/2] STEP 4/6: COPY --from=uv --chown=app:app /app/.venv /app/.venv Error: building at STEP "COPY --from=uv --chown=app:app /app/.venv /app/.venv": looking up UID/GID for "app:app": determining run uid: user: unknown user error looking up user "app" ```
1 parent 4ef8c81 commit 6df501c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ FROM python:3.12-slim-bookworm
3535

3636
RUN apt-get update && apt-get install -y screen && rm -rf /var/lib/apt/lists/*
3737

38+
# Create app user and group
39+
RUN groupadd -r app && useradd -r -g app app
40+
3841
# Set the working directory in the container
3942
WORKDIR /workspace
4043

0 commit comments

Comments
 (0)