Reputation: 109
Even though this question might look like a duplicate one, i seem to be having a peculiar problem here.
Scenario 1:The project folder in the /users directory
I get the below error when i tried to start my docker image:
docker: Error response from daemon: Mounts denied:
The path /users/myUserName/myApp/backend/build/pacts is not shared from OS X and is not known to Docker.
The exact same command passed a few days back and has suddenly stopped working
Scenario 2: The project folder is in the /Documents folder
The docker run command which threw the same error as Scenario 1 now somehow seems to work fine.
The docker preferences has /Users in the list of shared directories and still doesnt work. (Image attached) Docker preferences
Macos version : Mojave(10.14.6)
Note: Whenever the docker run command throws the error in Scenario 1, simply shifting the project to a new location (like /Downloads) seems to work fine.Even though this fixes the issue temporarily, i am curious to know why this error occurs even though the default preferences are as expected.
Upvotes: 1
Views: 2219
Reputation: 265006
The path is case sensitive. The paths /users/myUserName/myApp/backend/build/pacts
and /Users/myUserName/myApp/backend/build/pacts
are different inside of docker while MacOS treats them as the same.
To fix, you likely need to cd /Users/myUserName/myApp/
before running your command.
Upvotes: 3