Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User and group app:app does not exist in multistage.Dockerfile #29

Open
toshikish opened this issue Nov 19, 2024 · 0 comments
Open

User and group app:app does not exist in multistage.Dockerfile #29

toshikish opened this issue Nov 19, 2024 · 0 comments

Comments

@toshikish
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant