Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Fix cause of issues with shared files #34

Merged
merged 2 commits into from
Oct 25, 2022

Conversation

jolly-fellow
Copy link
Contributor

Synchronization of access rights to shared files between of the host and the container was based on a small hack where we create users with the same UID and GID on the host and in the container. Linux doesn't care of user names but only of id numbers so it considers users with the same ids as the same user. This mechanism worked well until namespaces mapping and rootless start were added to Docker. Since that moment these mechanisms interfere with each other and it causes the bugs.

Docker Desktop works with userns-remap turned on only. I found that Docker Desktop doesn't use dockerd daemon at all. I started Docker Desktop and stopped the daemon but DUNE commands still work well. It seems Docker Desktop has builtin daemon which works in parallel with the dockerd daemon. It is very easy to confuse which system you are currently working with. It cause issues and misunderstandings.

This fix removes the hack with creation in the container of a user with the same UID and GID as the host user. It allows Docker with turned on userns-remap correctly map UID and GID of a user from the container to a current host user. So all shared files get the UID and GID of a current host user.

Synchronization of access rights to shared files between of the host and the container
was based on a small hack where we create users with the same UID and GID on the host
and in the container. Linux doesn't care of user names but only of id numbers so it
considers users with the same ids as the same user. This mechanism worked well until
namespaces mapping and rootless start were added to Docker. Since that moment these
mechanisms interfere with each other and it causes the bugs.

Docker Desktop works with userns-remap turned on only.
I found that Docker Desktop doesn't use dockerd daemon at all. I started Docker Desktop
and stopped the daemon but DUNE commands still work well. It seems Docker Desktop has
builtin daemon which works in parallel with the dockerd daemon. It is very easy to confuse
which system you are currently working with. It cause issues and misunderstandings.

This fix removes the hack with creation in the container of a user with the same
UID and GID as the host user. It allows Docker with turned on userns-remap correctly
map UID and GID of a user from the container to a current host user. So all shared files
get the UID and GID of a current host user.
@jolly-fellow jolly-fellow requested a review from larryk85 October 21, 2022 12:42
Dockerfile.unix Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

host - container path not found issue
3 participants