-
Notifications
You must be signed in to change notification settings - Fork 72
Closed
Description
In multistage.Dockerfile L24, /app directory is copied from builder stage with --chown option.
But the specified user and group app:app is not added in base, builder and final images.
- Building an image using Kaniko fails with error message:
error building image: error building stage: failed to execute command: getting user group from chown: user app is not a uid and does not exist on the system. - Building an image using buildx succeeds, but the copied directory owner is
root:root.
root@91cf9a664aef:/# ls -al /app
total 136
drwxr-xr-x 6 root root 4096 Nov 19 01:27 .
drwxr-xr-x 1 root root 4096 Nov 19 01:31 ..
-rw-r--r-- 1 root root 66 Nov 19 01:26 .dockerignore
drwxr-xr-x 7 root root 4096 Nov 19 01:26 .git
drwxr-xr-x 3 root root 4096 Nov 19 01:26 .github
-rw-r--r-- 1 root root 30 Nov 19 01:26 .gitignore
drwxr-xr-x 4 root root 4096 Nov 19 01:27 .venv
-rw-r--r-- 1 root root 1216 Nov 19 01:26 Dockerfile
-rw-r--r-- 1 root root 3465 Nov 19 01:26 README.md
-rw-r--r-- 1 root root 775 Nov 19 01:26 compose.yml
-rw-r--r-- 1 root root 1139 Nov 19 01:26 multistage.Dockerfile
-rw-r--r-- 1 root root 405 Nov 19 01:26 pyproject.toml
-rwxr-xr-x 1 root root 966 Nov 19 01:26 run.sh
drwxr-xr-x 3 root root 4096 Nov 19 01:26 src
-rw-r--r-- 1 root root 77872 Nov 19 01:26 uv.lock
It would be better to add user and group beforehand.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels