docker: Error response from daemon: Mounts denied:
The path /users/davehassall/fabric-samples/test-network is not shared from the host and is not known to Docker.
According to documentation subdirectories of /users are shared and available to mount. Tried adding subdirectories to shares but this was removed.
Are you using Docker Desktop? On which operating system?
Note that the “Community” category is for asking about the community and events, not for askiing from the community. The whole forum is for that purpose So I will move the topic to the right category when you share more details.
Okay, I moved the topic to “Docker Desktop for Mac”
How did you mounted the folder? I know macOS has case insensitive path by default (although it depends on the chosen filesystem) but it matters on Linux and inside the virtual machine of Docker Desktop you have Linux. So if you use /users instead of /Users, Linux inside the VM will probably not find the folder.
Thanks for the help.
The fabric-samples on the Mac are located at /Users/davephassall/fabric-samples and according to docker documentation /Users and subdirectories are available to mount.
A recent system update seems to cause this in my case. The output of the pwd command now reflects /users instead of /Users so when doing docker run -it -v "$(pwd):/tmp" any_image:tag, I get this error. In fact, I just noticed my command line is incorrectly showing /users in lowercase as well.
I’ve aliased pwd to work around this: alias pwd="pwd|gsed -e 's#^/users#/Users#g'":
/users/t/go/s/gi/c/trust-manager main ❯ alias pwd="pwd|gsed -e 's#^/users#/Users#g'"
/users/t/go/s/gi/c/trust-manager main ❯ pwd
/Users/tspear/go/src/github.com/cert-manager/trust-manager
You’ll need gsed installed via Homebrew with brew install gnu-sed
Hello
I also ran into the same problem in my MacOS Sonoma 14.2.1
But different from your exp, when I run pwd I see Users/…
So I naively would like to think that it is (pwd => users/ problem) fixed in this version or in between 14.1 and 14.2.1…
Since the pwd output seems to be ok I did not apply the alias gsed… fix here…
but do not also have an idea what to do… any ideas? Thanks
Solved.
Putting a note here for those that encounter same/similar issues.
Apparently, as said, my problem was different from above and had a quick - easy solution.
Docker really could not find the directory bc it was not defined. So here is the solution:
go to docker icon on the tray (the menu bar at the top, whatever it is called) and go to settings / resources/ file sharing
add your folder to virtual fire shares
apply&restart
This solved my problem. Hope will be helpful to someone too.
alptekin