Open ryanomor opened 10 months ago
@ryanomor suggested on Slack it may be the same issue as #1209
Turns out volume mounting with docker compose in both Docker and Rancher Desktops has some issues.
I followed the instructions in the comment in the above issue thread: https://github.com/rancher-sandbox/rancher-desktop/issues/1209#issuecomment-1370181132
After adding the override config, I restarted rancher: rdctl shutdown, then rdctl start (you may have to reset the context back to rancher desktop: docker context use rancher-desktop)
I ran docker compose up and all my containers seemed to be running with the right permissions except for my postgres one. So I just manually ran it without using compose and it worked: docker run --name postgres11 -e POSTGRES_USER=$PG_USER -e POSTGRES_PASSWORD=$PG_PASS -p 5432:5432 --detach postgres:11
Thanks for the update!
I would like to keep this issue open for a bit, to see if e.g. there is something we can add to our docs about it.
Actual Behavior
After creating and running my containers using
docker compose up -d
, when I try connecting to it, I get permission issues. I open the container logs withdocker container logs $CONTAINER_ID
and get multiple lines ofchown: changing ownership of '/var/lib/postgresql/data/base/558180/558738': Permission denied
Steps to Reproduce
Create a docker-compose.yml that has the same config as below. Then run
docker compose up -d
and try connecting to the container and view the logs:Result
Can not connect to the port exposed by the container. And when I get the logs of the container, I get multiple chown permission denied errors
Expected Behavior
Can connect to the port exposed by container. No permission denied logs in container
Additional Information
No response
Rancher Desktop Version
1.10.0
Rancher Desktop K8s Version
v1.27.7
Which container engine are you using?
moby (docker cli)
What operating system are you using?
macOS
Operating System / Build Version
macOS Monterey 12.7
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
None
Windows User Only
No response