Path not shared with host from osx, unable to mount

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.

git 2.37.1
curl 7.85.0
docker 20.10.21
docker composer 2.13.0
osx ventura 13.1

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 :slight_smile: So I will move the topic to the right category when you share more details.

Hi, yes docker desktop on osx ventura 13.1

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.

Please, read my comment again. Yes, /Users is mounted, but it is not /users. It really matters on Linux (in the VM of Docker Desktop).

Thanks, that fixed the problem. I created a new file share on docker desktop for /users/davehassall/fabric-samples.

I am glad I could help, but wouldn’t have been easier to just use /Users instead of /users in your mount definition?

Thank you, that has fixed the problem. I have updated the community thread but not sure if it should then be marked closed?

As soon as I submitted that, the desktop deleted it

If you mean this topic, we can leave it as is. It looks like there is no “Solution” button here.

Sorry I was not clear enough. I was referring to the docker mount definition not Docker Desktop.

docker run --name test -d -v /Users/davehassall/fabric-samples/test-network:/path <image>`

instead of

docker run --name test -d -v /users/davehassall/fabric-samples/test-network:/path <image>`

I just ran into this myself on OSX Sonoma 14.1.1

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