简体   繁体   中英

docker: Error response from daemon: Mounts denied:

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM