docker / desktop-linux

Bug reports for Docker Desktop for Linux
https://docs.docker.com/desktop/linux/
82 stars 7 forks source link

Docker context desktop-linux has container permission issues #75

Open secondl1ght opened 2 years ago

secondl1ght commented 2 years ago

Expected behavior

Docker context desktop-linux is able to run containers without permission issues the same behavior as context default.

Actual behavior

When I run docker compose up -d certain containers enter a state of continual restarting due to permission denied issues, here is one example log message:

EXCEPTION: NSt10filesystem7__cxx1116filesystem_errorE filesystem error: cannot create directories: Permission denied

I am able to run docker commands without sudo so the permissions issue seems to only affect inside containers. When I switch the context to use docker context use default and start the containers in the same repo, the containers run with no permissions issues.

Information

Steps to reproduce the behavior

I am not sure if this is reproducible, this is my first time using Docker Desktop for Linux (I think it was released not too long ago). Before I ran Docker Engine and Docker Compose standalones and did not have any issues with the same codebase.

EDIT: see comment below - another user was able to reproduce

Thanks for any help on this!

asoltys commented 2 years ago

I ran into this issue too with containers that had mounted volumes with user permissions set to 1000:1000 which is the same uid:gid as the default user account on my host machine.

With Docker Desktop the uid:gid for the user within the container seems to have changed to 100999:100999 so updating the volume ownership permissions to that has solved the issue for me.

ghost commented 2 years ago

@asoltys So does changing to 100999 help? and how do i do that...

asoltys commented 2 years ago

Yeah it helped me.

sudo chown -R 100999:100999 /your/volume

ghost commented 2 years ago

sounds like i would have to do this everytime if i set a new volume. its a solution but is not an ideal one. but thanks.

docker-robott commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

aikaterine commented 1 year ago

/remove-lifecycle stale

This is still an issue. Every time I set a new volume this happens,

computerquip-work commented 1 year ago

This makes Docker for Desktop on Linux unusable for me.

NickSdot commented 1 year ago

Perhaps related: https://github.com/docker/desktop-linux/issues/81