Closed Ernestopheles closed 1 year ago
I read in the docker desktop docu about the uid and gid issues but - sorry - did not understand how to solve this issue. They write there:
The problem is resolved by creating a group with the new GID and adding our user to it, or by setting a recursive ACL (see setfacl(1)) for folders shared with the Docker Desktop VM.
I found this issue
Not sure if it is same as my problem
I am hanging round with this docker desktop for more than 1 day unsuccesfully.
Think I will go back to the (working fine) docker engine.
I solved this (my advice: do NOT use docker desktop; use docker engine instead; it's MUCH easier to configure!)
On Ubuntu:
Groupname can freely be chosen (I used dockerdesktop)
sudo addgroup dockerdesktop
sudo groupmod -g 100999 dockerdesktop
sudo usermod -aG dockerdesktop <your hostuser>
newgrp
This enables your hostuser to access any file that devilbox created or changed
chmod -R g+wx <projectfolder)
sudo chgrp -R dockerdesktop <projectfolder>
This enables Docker Desktop / devilbox full access fto any folder in the shared space
why spent the extra time just to create a new group and add 1009999 to that group.. is waste of time.. use Docker Engine.
I encountered the same issue with Docker Engine in rootless mode. Switching to Docker Engine will not solve the problem, therefore.
However, your solution also works with Docker Engine in rootless mode, so a big thank you.
Have you already looked into this bug?
(Optional) Error message
in /shared/httpd/contao413 $ mkdir test mkdir: cannot create directory ‘test’: Permission denied
What went wrong?
The mkdir command is working under shared/httpd/. But it does not work on any deeper folder-level.
Expected behaviour
access should be granted
How can we reproduce the bug?
In the devilbox shell issue the mkdir command
Host Operating System
Linux
Host Platform (amd64, arm64, other)
amd64
(Linux only) Is SELinux enabled?
Yes, SELinux is enabled
Docker version
23.0.1
Docker Compose version
2.15.1
Devilbox version
v3.004 beta
Have you removed stopped containers before starting?
Yes
Have you pulled latest Docker images before starting?
Yes
Devilbox start command
docker compose up -d httpd php mysql
Config: .env file
Config: docker-compose.override.yml
Config: ./check-config.sh
Log: docker-compose logs
(Optional) Additional information
Because of a crash of my computer (no disk space left after change of PHP version in .env and then starting devilbox) I reinstalled Ubuntu and everything. Before I used docker , now I use docker desktop.