How to keep same file ownership on host and in the container? #824
Replies: 1 comment
- 8000
-
My fault. Not |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here is a part of my
podman-compose.yml
This is the call to the podman composer:
The
web
volume is intended to be write-accessible from both the container and the host.However, in this configuration, the
/app
folder and its files are owned by root. If I add the 'U' flag (- .:/app:z,U
), the folder becomes write-accessible to the container but is locally owned by a user with UID 100999 and GID 100999.When running a container from the resulting image:
podman run -it -v .:/home/lesha:z --userns=keep-id --entrypoint /bin/sh quotes_web:latest
Ownership is correct inside the container and does not change on the host, working as expected. Any suggestions on how to fix this for
podman-compose
?This is the Dockerfile:
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions