ethereum-docker
ethereum-docker copied to clipboard
Mount denied - Path /etc/localtime is not shared from OS X and is not known to Docker
MAC OS version - Sierra 10.12.6 (16G1408) Docker version - 18.03.0-ce, build 0520e24
Reproduce this error as
$ docker-compose up -d
Starting c1b9c5a1c9d4_netstats ... error
ERROR: for c1b9c5a1c9d4_netstats Cannot start service netstats: b'Mounts denied: \r\nThe path /etc/localtime\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 netstats Cannot start service netstats: b'Mounts denied: \r\nThe path /etc/localtime\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.
While trying docker-compose up -d, got this error - Issue - docker/for-mac#2396 Solution that worked for me
$ mkdir ~/etc
$ vi ~/etc/timezone
Enter the timezone (mine was America/New_York)
Later updated the docker-compose.yml file with the following
- ~/etc/timezone:/etc/localtime:ro
# - /etc/localtime:/etc/localtime:ro #comment this
I'm not even sure the localtime is necessary.
I had the same problem, tried many different solutions, even making a new ln -s to the localtime folder location until i commented out the volumes pointing out for localtime.
It seems to work on my machine.
Note that /etc/localtime itself is no more than a symlink to /private/etc/localtime on Mac OS .
Trying to attach directly to /private/etc/localtime brought me an error too though
In case someone else running macOS 11 Big Sur stumbles upon this: Sharing the /private folder works (for me):
# docker-compose.yml
volumes:
- /private/etc/localtime:/etc/localtime:ro
The /private-resource was added in Docker 3.1 macOS desktop app preferences.