Incorrect owner on volume inside bind mount #47722
Labels
kind/enhancement
Enhancements are not bugs or new features but can improve usability or performance.
kind/question
status/0-triage
Description
I use a docker-compose file:
and a Dockerfile:
When the docker compose is up, two new folder(modules, uploads) will be created on host (not inside docker) with root:root permission, which is not expected. And inside docker, modules will have node:node permission, and uploads will have root:root permission.
And when I change owner inside container with
docker compose exec -u root node chown node:node -R uploads
, the owner on the host will not change, and the owner in container changed correctly.note: the node:latest image will create a user node(1000:1000) by default. My host user(corporal) is also 1000:1000
Reproduce
Expected behavior
The folders on host should be created with 1000:1000 permission
docker version
docker info
Additional Info
I wonder if this can be set in someway, or are there any workaround? Thanks in advance!
The text was updated successfully, but these errors were encountered: