I just ran docker-compose up -d nginx mysql redis
to install docker for the first time on Mac OSX 10.13.6 High Sirra. It seems I
WARNING: Image for service nginx was built because it did not already exist. To rebuild this image you must use
docker-compose build
ordocker-compose up --build
. Creating laradock_docker-in-docker_1 ... error Creating laradock_mysql_1 ... Creating laradock_workspace_1 ... Creating laradock_redis_1
...Creating laradock_mysql_1 ... error X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'
ERROR: for laradock_mysql_1 Cannot start service mysql: b'Mounts denied: \r\nThe path /Applications/MAMP/htdocs/community-messenger/laradock/mysql/docker-entrypoint-initdb.d\r\nisCreating laradock_workspace_1 ... error fs/#namespaces for more info.\r\n.'
ERROR: for laradock_workspace_1 Cannot start service workspace: b'Mounts denied: \r\nThe path /Applications/MAMP/htdocs/community-messenger\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.Creating laradock_redis_1 ... done
ERROR: for docker-in-docker Cannot start service docker-in-docker: b'Mounts denied: \r\nThe path /Applications/MAMP/htdocs/community-messenger\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'
ERROR: for mysql Cannot start service mysql: b'Mounts denied: \r\nThe path /Applications/MAMP/htdocs/community-messenger/laradock/mysql/docker-entrypoint-initdb.d\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'
ERROR: for workspace Cannot start service workspace: b'Mounts denied: \r\nThe path /Applications/MAMP/htdocs/community-messenger\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.' ERROR: Encountered errors while bringing up the project.
From what I can gather it's telling me that I need to add /Applications/MAMP/htdocs/
to Docker > Preferences > File Sharing. I tried that an am still getting similar errors.
I only use /Applications/MAMP/htdocs/
as a place where I put my projects out of habit and don't actually start or use MAMP. Is it possible to solve this by just moving the file?
I also found out that I had MySQL running in the background, so I shut it off, restarted docker and reran docker-compose up -d nginx mysql redis
with similar errors.
Edit
I added /Applications/MAMP/htdocs/community-messenger
to to Docker > Preferences > File Sharing and am now getting a new error:
Starting laradock_workspace_1 ... done Starting laradock_mysql_1 ... done Starting laradock_redis_1
... done Starting laradock_docker-in-docker_1 ... done Creating laradock_php-fpm_1 ... done Creating laradock_nginx_1
... errorERROR: for laradock_nginx_1 Cannot start service nginx: driver failed programming external connectivity on endpoint laradock_nginx_1 (000b8e0f3a128f87e88d9faaff8b9dcf6d999e0a04a256763b8aef953eeebd35): Error starting userland proxy: Bind for 0.0.0.0:443: unexpected error (Failure EADDRINUSE)
ERROR: for nginx Cannot start service nginx: driver failed programming external connectivity on endpoint laradock_nginx_1 (000b8e0f3a128f87e88d9faaff8b9dcf6d999e0a04a256763b8aef953eeebd35): Error starting userland proxy: Bind for 0.0.0.0:443: unexpected error (Failure EADDRINUSE) ERROR: Encountered errors while bringing up the project.