简体   繁体   中英

Docker error: Error response from daemon: Mounts denied: on OS X

I've currently a problem and can't find a solution. I've created an apps folder in my document directory of my user and set it as apps path in the config. When I try to run the docker I get following error:

Error response from daemon: Mounts denied: The path /users/username/documents/development/docker-apps is not shared from OS X and is not known to Docker. You can configure shared paths from Docker -> Preferences... -> File Sharing.

I've added the /Users in the preferences globally but the issue is still there:

在此处输入图片说明

When I try to add the path I get an error massage that it's not possible because I've added the /Users globally.

My research ended with no helpful answers so I would really appreciate if you can help me with this problem.

I've found the problem. It seems that OS X with Docker has a problem with the path. On Linux all works fine but in OS X not. So when you write this here in the terminal, it will work but not in the Docker:

/users/username/documents/development/docker-apps

So when you add another / at the end like this:

/users/username/documents/development/docker-apps/

it will work.

For MacOS Docker 3.0 or higher answer provided by François Alexandre

Docker: Mounts denied. The paths ... are not shared from OS X and are not known to Docker

"With the new version 3.0.0 of Docker for mac, you need to disable use gRPC FUSE for file sharing in Preferences>Experimental Features."

For me it was running docker run shell script as sudo that resolved the issue.

IND00237:dispatcher-sdk-2.0.22 rahul.saini$ ./bin/docker_run.sh ./out host.docker.internal:4503 8080

docker: Error response from daemon: Mounts denied: The paths /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/vhosts_conf and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/custom_vars and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/global_vars and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/rules_any and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/filters_any and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/rewrite_rules and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/farms_any and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/clien theaders_any and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/virtualhosts_any are not shared from OS X and are not known to Docker. You can configure shared paths from Docker -> Preferences... -> File Sharing. See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info. . ERRO[0000] error waiting for container: context canceled

IND00237:dispatcher-sdk-2.0.22 rahul.saini$ sudo su Password: sh-3.2# cd /Users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/

sh-3.2# ./bin/docker_run.sh ./out host.docker.internal:4503 8080 Running script /docker_entrypoint.d/10-check-environment.sh Running script /docker_entrypoint.d/20-create-docroots.sh Running script /docker_entrypoint.d/30-wait-for-backend.sh Waiting until host.docker.internal is available host.docker.internal resolves to 192.168.65.2 Running script /docker_entrypoint.d/40-generate-allowed-clients.sh Running script /docker_entrypoint.d/50-check-expiration.sh Running script /docker_entrypoint.d/60-check-loglevel.sh Running script /docker_entrypoint.d/70-check-forwarded-host-secret.sh Starting httpd server [Wed Jul 01 08:05:16.270293 2020] [:notice] [pid 1:tid 140296106285960] ModSecurity for Apache/2.9.2 ( http://www.modsecurity.org/ ) configured. [Wed Jul 01 08:05:16.270332 2020] [:notice] [pid 1:tid 140296106285960] ModSecurity: APR compiled version="1.6.3"; loaded version="1.6.3" [Wed Jul 01 08:05:16.270337 2020] [:notice] [pid 1:tid 140296106285960] ModSecurity: PCRE compiled version="8.42 "; loaded version="8.42 2018-03-20" [Wed Jul 01 08:05:16.270339 2020] [:notice] [pid 1:tid 140296106285960] ModSecurity: LIBXML compiled version="2.9.8" [Wed Jul 01 08:05:16.270341 2020] [:notice] [pid 1:tid 140296106285960] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On. [Wed Jul 01 08:05:16.341071 2020] [mpm_worker:notice] [pid 1:tid 140296106285960] AH00292: Apache/2.4.43 (Unix) Communique/4.3.4-20200424 mod_qos/11.63 configured -- resuming normal operations [Wed Jul 01 08:05:16.341107 2020] [core:notice] [pid 1:tid 140296106285960] AH00094: Command line: 'httpd -d /etc/httpd -f /etc/httpd/conf/httpd.conf -D FOREGROUND -D ENVIRONMENT_DEV'

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