How to keep same file ownership on host and in the container? #824
Replies: 1 comment
-
|
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.ymlThis is the call to the podman composer:
The
webvolume is intended to be write-accessible from both the container and the host.However, in this configuration, the
/appfolder 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:latestOwnership 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