desktop-linux icon indicating copy to clipboard operation
desktop-linux copied to clipboard

Docker context desktop-linux has container permission issues

Open secondl1ght opened this issue 3 years ago • 8 comments

  • [x] I have tried with the latest version of Docker Desktop
  • [x] I have tried disabling enabled experimental features
  • [x] I have uploaded Diagnostics
  • Diagnostics ID: c66b74da-a881-4376-a708-5b140a1b5648/20220913172047

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

  • Linux distro: elementary OS
  • Distro version: 6.1
  • Docker Desktop Version: 4.12.0

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!

secondl1ght avatar Sep 13 '22 19:09 secondl1ght

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.

asoltys avatar Sep 15 '22 05:09 asoltys

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

ghost avatar Sep 29 '22 06:09 ghost

Yeah it helped me.

sudo chown -R 100999:100999 /your/volume

asoltys avatar Sep 29 '22 07:09 asoltys

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.

ghost avatar Sep 30 '22 17:09 ghost

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

docker-robott avatar Feb 28 '23 01:02 docker-robott

/remove-lifecycle stale

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

aikaterine avatar Mar 02 '23 13:03 aikaterine

This makes Docker for Desktop on Linux unusable for me.

computerquip-work avatar Mar 08 '23 20:03 computerquip-work

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

NickSdot avatar May 17 '23 14:05 NickSdot