docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.43k stars 118 forks source link

Error response from daemon: Mounts denied: The path **** is not shared from the host and is not known to Docker. #6759

Open willrichanbach opened 1 year ago

willrichanbach commented 1 year ago

Expected behavior

Expected to run docker compose up and for all services to run mounting appropriate volumes.

Actual behavior

Unable to bring containers up. Error when attempting to bind/mount volumes.

Information

This was all working before cloning a different repo in a different project folder. Now running docker compose up for any project fails with same error. Can change .yml file to reflect absolute paths and will work but is not a viable solution for project collaboration.

mogur@Mogurs-Mac-mini project-beta % docker compose up
WARN[0000] The "OS" variable is not set. Defaulting to a blank string. 
Attaching to project-beta-database-1, project-beta-inventory-api-1, project-beta-react-1, project-beta-sales-api-1, project-beta-sales-poller-1, project-beta-service-api-1, project-beta-service-poller-1
Error response from daemon: Mounts denied: 
The path /users/mogur/projects/project-beta/db is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/desktop/mac for more info.
mogur@Mogurs-Mac-mini project-beta % 

Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check

`mogur@Mogurs-Mac-mini project-beta % /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check [2023-03-09T20:27:19.906078000Z][com.docker.diagnose][I] set path configuration to OnHost Starting diagnostics

[PASS] DD0027: is there available disk space on the host? [PASS] DD0028: is there available VM disk space? [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0013: is the $PATH ok? [PASS] DD0003: is the Docker CLI working? [PASS] DD0038: is the connection to Docker working? [PASS] DD0014: are the backend processes running? [PASS] DD0007: is the backend responding? [PASS] DD0008: is the native API responding? [PASS] DD0009: is the vpnkit API responding? [PASS] DD0010: is the Docker API proxy responding? [SKIP] DD0030: is the image access management authorized? [PASS] DD0033: does the host have Internet access? [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0032: do Docker networks overlap with host IPs? segment 2023/03/09 12:27:23 ERROR: sending request - Post "https://api.segment.io/v1/batch": dial tcp [::]:443: connect: connection refused segment 2023/03/09 12:27:23 ERROR: 1 messages dropped because they failed to be sent and the client was closed No fatal errors detected. `

Steps to reproduce the behavior

Running docker compose up in any project folder fails.

Possibly similar to: https://github.com/docker/compose-cli/issues/1043 https://github.com/docker/for-mac/issues/6564 https://github.com/docker/for-mac/issues/4785

DimitriDR commented 1 year ago

I've got the same issue with the very same Docker version. I just set up my docker-compose as usual.

On macOS Monterey.

willrichanbach commented 1 year ago

Downgrading to Mac Silicon version 4.16.2 seems to allow compose up to run as expected.

docker-robot[bot] commented 1 year ago

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

nsina commented 8 months ago

Any updates on this? There are still issues on macOS (currently running v4.27.1) on M2 Pro with Sonoma 14.3