-
Notifications
You must be signed in to change notification settings - Fork 611
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
Mounted volumes change permissions to root:nogroup #693
Comments
Same behaviour here. For instance $ cat > test.txt
This is a test
^C
$ ls -asl "$(PWD)"
4 -rw-r--r-- 1 foo 15 Mar 14 15:57 test.txt
$ docker run --rm -it -v "$(PWD)":/app --user nginx nginx:1.19.1 ls -asl /app
total 4
4 -rw-r--r-- 1 root nogroup 15 Mar 14 14:57 test.txt Whereas with Docker Desktop: $ docker run --rm -it -v "$(PWD)":/app --user nginx nginx:1.19.1 ls -asl /app
total 4
4 -rw-r--r-- 1 nginx nginx 15 Mar 14 14:57 test.txt VersionsMacOS : Monterey$ limactl --version
limactl version 0.9.1
$ docker --version
Docker version 20.10.13, build a224086349 |
Same problem here.. inside the
As soon as I mount the files inside a container, the permissions are lost:
Versions:
|
Ok, the permission-issue is related to this I've recreated my This is my current vm-spec if you want to try: NOTE: you have to reboot the vm after creatig it; |
I get this issue with the It seems the bind mount will only set UID and GID to either See the following example. $ cd /tmp/lima
$ limactl --version
limactl version 0.20.1
$ touch test
$ ls -ln
total 0
-rw-r--r-- 1 501 0 0 7 Feb 01:26 test
$ docker run -it --rm -v `pwd`:`pwd` -w `pwd` alpine sh
/tmp/lima # ls -ln
total 0
-rw-r--r-- 1 0 65534 0 Feb 7 01:26 test
/tmp/lima # touch test2
/tmp/lima # ls -ln
total 0
-rw-r--r-- 1 0 65534 0 Feb 7 01:26 test
-rw-r--r-- 1 0 65534 0 Feb 7 01:26 test2
/tmp/lima # exit
$ ls -ln
total 0
-rw-r--r-- 1 501 0 0 7 Feb 01:26 test
-rw-r--r-- 1 501 0 0 7 Feb 01:26 test2
$ sudo chown 1000:1000 test test2
$ ls -ln
total 0
-rw-r--r-- 1 1000 1000 0 7 Feb 01:26 test
-rw-r--r-- 1 1000 1000 0 7 Feb 01:26 test2
$ docker run -it --rm -v `pwd`:`pwd` -w `pwd` alpine sh
/tmp/lima # ls -ln
total 0
-rw-r--r-- 1 65534 0 0 Feb 7 01:26 test
-rw-r--r-- 1 65534 0 0 Feb 7 01:26 test2 |
Description
I'm on Big Sur
Hello, I'm just trying a simple Dockerfile like this:
Which has a couple volumes mounted in docker-compose.
If there are no volume mounts, the container is running with files under user:group
node:node
like expected, but once I mount volumes, these files are having their users and groups changed toroot:nogroup
.Docker Desktop mounts the volumes keeping node:node permissions in the container.
Is there anyway with Lima to achieve this same behaviour? Thanks.
The text was updated successfully, but these errors were encountered: