-
Notifications
You must be signed in to change notification settings - Fork 29
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
Home directory points to snap volume #7
Comments
I've looked, and there isn't anything specific we're doing to set I think we could possibly do something with a wrapper script that sets You should also be able to use |
Thank you for looking into it, @tianon. Unfortunately, I do not know how Compose resolves |
the home interface should already be connected for the docker snap on all systems, but I agree that simply changing the value of $HOME for the snap will probably regress some users of the snap, and also will break in the sense that if anything tries to write to |
I might be misunderstanding the permissions here - isn't dockerd running as root and the containers with the current user's permissions and thus should have the permissions for the current user's home? |
No, all snaps are denied access to dotfiles in user's home directories by design. The only exception is by using a personal-files interface. Also technically speaking yes normally the dockerd daemon running as root will not have permission to read user's home directories, however the docker snap has a variant of the home interface that specifies the |
I think I just ran into this when attempting to use bazel to build images with rules_docker. Bazel, by default, stores all its outputs and various working files in I assume that |
While snap Docker is not ideal, it offers increased security by limiting access to one's own home directory. |
When mounting volumes with
docker-compose
, I expect paths like~/.config
and$HOME/.config
to point to the home directory of the current user.Currently, these paths point to the snap volume, e.g.
/home/ksilin/snap/docker/471/.config
. This is unexpected and makes mounting from current user's home directory non-portable.The text was updated successfully, but these errors were encountered: