-
Notifications
You must be signed in to change notification settings - Fork 285
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
chown error on bind mount when trying to launch postgres via docker compose #1209
Comments
Rancher Desktop Version0.7.1 and 1.0.0-beta.1 Rancher Desktop K8s Version1.23.1 (latest), using the dockerd (moby) container runtime What operating system are you using?macOS Operating System / Build VersionmacOS Catalina 10.15.7 (19H1615) What CPU architecture are you using?x86-64 (Intel) Windows User OnlyNo response Actual BehaviorTrying to chown a folder mounted as a volume, from inside the container fails with a permission error. Steps to ReproduceHere is some of the output from running the endpoint script manually, if it helps any.
|
Here's a minimal test case derived from the above practical example. There seem to be two potentially independent mounted volume errors. The first error relates to the mounted volume not existing on the host os (macos) prior to running the docker command.
The second error relates to attempting to change the ownership of the mount point within the docker container. Though changing the file mode succeeds.
|
I'm having the same problem, this is the only thing holding me from using Rancher Desktop. Any progress here? |
MacOS, RD v1.0.0 Getting permission error when running postgres image with bind-mount (
But if I use named volume (
|
I think this may be an issue with the underlying Possibly related lima-vm/lima#504 |
They converted that issue into a discussion lima-vm/lima#505 marked it as answered.
To me, it doesn't feel like the answer is addressing the broader concerns raised above. |
There's also this earlier issue thread: lima-vm/lima#231 The last comment, which is from Dec, was:
|
As a followup, the latest version of the patch is https://gitlab.com/wwcohen/qemu/-/tree/9p-darwin and that's where the in-progress work will go as it progresses towards resubmission upstream. Any comments on how to improve would be GREATLY welcomed before I submit again. |
From NixOS/nixpkgs#122420, it looks like good progress has been made:
|
Please let me know if you have any questions! |
Still an issue with Rancher Desktop 1.4.1, exactly as described above. This is the only thing preventing me from using Rancher as opposed to Docker. |
Good call. I tried it and I got "failed: Too many levels of symbolic links (40)" , so it won't work for my use case. I'll try the colima method. |
I found and enabled those settings late yesterday. RD said it needed to restart afterwards, so I stopped and started it. 12+ hours later, it still says "starting". I'll try rebooting my workstation and see how things go. |
I tripped on something like that, I can't remember what my problem was, visit Slack (see https://rancherdesktop.io/) and ask for help. |
I'm also having the same problem as the OP, running Postgres in docker-compose with a bind mount running on Apple silicon M2. I get that same error. I'm running RD 1.10.0. It looks like there's at least one workaround but that it might cause a bunch of trouble with other containers using simlinks. I'm happy to provide more information if it can help someone debug this. I unfortunately don't know where to start to debug/fix it myself. |
This solved my issue, thanks for posting
|
Just chiming in in 2024, M1 Mac running |
this works for me, https://stackoverflow.com/a/77803515/1183542 |
After my Mac upgrade to 14.3.1, former projects failed with this error: |
current workaround for me is to set VZ as emulation in preference. |
... and "Volumes/Mount Type" to |
…irtiofs (#90) This PR addresses the Docker volume issues encountered by users on M2 and M3 Macs, as reported in this thread: rancher-sandbox/rancher-desktop#1209 @cobbr2 just had a rough time with this one on his m2 mac. He was seeing similar permission errors when trying to mount host volumes, preventing services like PostgreSQL from starting correctly. We were able to resolve the underlying issue by switching from the default QEMU emulation to VZ (Virtualization.framework) and enabling virtiofs for file sharing between the host and the guest VM. The PR reintroduces the necessary configuration changes that were previously removed, as these are still required for M2 and M3 Macs running Rancher Desktop. This also adds the fix to prevent needing to manually select virtiofs to get it working too.
VZ and virtiofs also fixed it for me. |
Same behavior on Mac M1. Error: /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura exited with code 1 'time="2024-07-12T13:57:42+02:00" level=info msg="[hostagent] Waiting for the essential requirement 1 of 3: \"ssh\""\n' + If going back to RD 1.11.1 this issue with chowning still occurs, and no VZ can be use either as it gets stuck starting vm with the progress bar loading infinitely. `2024-07-12T11:52:05.190Z: > /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura list --json 2024-07-12T12:02:05.464Z: > limactl start --tty=false 0 |
See the link some comments above: #1209 (comment) |
oh thanks, that was my bad |
Rancher Desktop Version
0.7.1
Rancher Desktop K8s Version
1.22.5
What operating system are you using?
macOS
Operating System / Build Version
macOS Monterey 12.1
What CPU architecture are you using?
arm64 (Apple Silicon)
Windows User Only
No response
Actual Behavior
When trying to launch a Postgres container with a bind mount, it doesn't work because of a
chown
related error to the folder at startupSteps to Reproduce
Clone the repo https://github.com/docker/awesome-compose, go to the folder
nginx-golang-postgres
, edit the filedocker-compose.yml
to use a bind mount like the followingRun the following command:
docker compose up
Result
Expected Behavior
I would expect to be able to access locally the folder as a bind mount in order to access and modify the files directly
Additional Information
No response
The text was updated successfully, but these errors were encountered: