Closed ghost closed 6 years ago
Thanks for your report! There are a number of issues that you are encountering that should each be addressed:
sudo
and does not create files as root. Mesosphere Universe explicitly checks for root in scripts/local-universe.py
and fails if the euid
is not 0. This likely needs to be corrected in Universe.getattrlist
error under any circumstances.I've opened issues to track 2 and 3. 4 is already tracked and 1 needs to be reported to Mesosphere Universe.
Hopefully this is the correct issue. I'm running docker for mac beta version 1.12.2 API 1.24.
docker run -t --rm -v /Applications/MAMP/htdocs/:/htdocs alpine sh -c "ls -la /htdocs"
Gives the error:
docker: Error response from daemon: Mounts denied: The path /Applications/MAMP/htdocs/ is not shared from OS X and is 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. ..
What used to work in version 1.11.1, back in July also gives the same error.
docker run -t --rm -v /Mac/Applications/MAMP/htdocs/:/htdocs alpine sh -c "ls -la /htdocs"
Trying to fix via Docker -> Preferences -> File Sharing also gives an error.
Path / is reserved by Docker.
HTH to get this issue resolved. My motive is have the same run commands on OS X and linux.
@ebridger your issue is different from the one in this ticket. /Mac
has been removed and will no longer work. To share /Applications/MAMP/htdocs
, I recommend sharing exactly that path from :whale: ➡️ Preferences
➡️ File Sharing
. If you still have difficulties with file sharing, please open a new issue.
@dsheets. Thanks. See #811
$ minimesos
docker: Error response from daemon: Mounts denied:
The path /usr/local/bin/docker
is not shared from OS X and is 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.
..
Hi @xiaods, your issue is different from the one in this ticket. The docker
executable is not at /usr/local/bin/docker
(that path does not exist) in the Docker for Mac VM -- it is instead located at /usr/bin/docker
. This appears to be an issue with the minimesos
tool. Please modify your configuration or report this issue to the minimesos
developers. If you still believe this to be an issue with Docker for Mac, please open a new issue with details of what you are running and include your diagnostic ID from :whale: ➡️ Diagnose & Feedback...
➡️ Diagnose & Upload
. Thanks!
@dsheets thanks for your reminder. create it again.
I found another way to use DC/OS universe, and this issue was not import to me. But I modified the universe build script and disable sudo check on Mac. There still have problem:
docker: Error response from daemon: Mounts denied: or-mac/osxfs/#namespaces for more info.
.
l63qb75wt4qhvc0000gn/T/tmpt8se1gcw/registry
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
The tmp path was changed on every build, so I can not specify it before build. Maybe this is still a problem of Universe, I will commit an issue there.
Closing the issue now as the original issue has been fixed. I am not sure what we can do about randomly generated paths to share, maybe try to share the parent directory?
I'm reopening this, since we believe that the EACCES
issue is not yet fixed.
Just encountered the same error on Docker for Mac Version 1.13.1 (15353) when building DC/OS universe. Would appreciate it if someone working on this ticket can share some update.
@yuchaoran2011 most of the major issues are fixed on the Docker side. There may still be issues with Universe assuming sudo
is required and with unhelpful permissions error messages from Docker for Mac. Could you be more specific about exactly what you are executing and what error you get? It would also be helpful to provide the permissions of the directories you are trying to share and the list of exported directories from :whale: ➡️ Preferences...
➡️ File Sharing
. Thanks!
Thanks @dsheets for the quick reply!
I executed the following command: sudo make local-universe under universe/docker/local-universe.
The error message was:
sudo make local-universe
rm -rf certs && \
rm -f local-universe.tar.gz || 0
python3 /Users/cyu/OSS/universe/docker/local-universe/../../scripts/local-universe.py \
--repository /Users/cyu/OSS/universe/docker/local-universe/../../repo/packages/ \
--include="marathon-lb,zeppelin" && \
docker save -o local-universe.tar mesosphere/universe:latest && \
gzip local-universe.tar
Start docker registry.
436f6f9a5c5fcb49e300c7aa40b493019d7e0cc916b7ba4bad2fbc5bc166e020
docker: Error response from daemon: Mounts denied: { errno = [EACCES]; call = getattrlist; label = /private/tmp/tmpo7euiq7l/registry }.
Traceback (most recent call last):
File "/Users/cyu/OSS/universe/docker/local-universe/../../scripts/local-universe.py", line 347, in
My list of exported directories in Docker "File Sharing" tab are: /Users, /Volumes, /tmp, /private. The directory I want to share is under /Users.
Hi @yuchaoran2011, you are running into (1) from https://github.com/docker/for-mac/issues/733#issuecomment-252889214:
Docker for Mac does not require
sudo
and does not create files as root. Mesosphere Universe explicitly checks for root inscripts/local-universe.py
and fails if theeuid
is not 0. This likely needs to be corrected in Universe.
Could you please try disabling the scripts/local-universe.py
check and running make local-universe
without sudo
?
That's not working for me unfortunately. I disabled the root check and ran command without sudo. Then I got the following error message:
$ make local-universe
rm -rf certs && \
rm -f local-universe.tar.gz || 0
python3 /Users/cyu/OSS/universe/docker/local-universe/../../scripts/local-universe.py \
--repository /Users/cyu/OSS/universe/docker/local-universe/../../repo/packages/ \
--include="marathon-lb,zeppelin" && \
docker save -o local-universe.tar mesosphere/universe:latest && \
gzip local-universe.tar
Start docker registry.
0d8be149c8928725b7809ec3e40d5a23a1f3fb7263ec7119dc994fe83e2a6e3b
docker: Error response from daemon: Mounts denied: or-mac/osxfs/#namespaces for more info.
.
s8pnp350h1ndtw0000gn/T/tmpx13yftd7/registry
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-f.
Traceback (most recent call last):
File "/Users/cyu/OSS/universe/docker/local-universe/../../scripts/local-universe.py", line 347, in
This does seem a Mac-specific bug, because I was able to build on Ubuntu without problems.
@yuchaoran2011 I believe you need to export /var/folders
from :whale: ➡️ Preferences...
➡️ File Sharing
.
@yuchaoran2011 did you have a chance to try @dsheets' suggestion?
I actually had the same issue, I went ahead and disabled sudo as per the above suggestions. My Preferences -> File Sharing
already had /private
set - so /private/var/folders
would have been redundant.
My current File Sharing
setup:
/Users
/Volumes
/tmp
/private
Last error:
Bens-MacBook-Pro:local-universe bneil$ make local-universe
rm -rf certs && \
rm -f local-universe.tar.gz || 0
python3 /Users/bneil/src/mesos/universe/docker/local-universe/../../scripts/local-universe.py \
--repository /Users/bneil/src/mesos/universe/docker/local-universe/../../repo/packages/ \
--include="kafka,confluent-kafka,jenkins,elasticsearch" && \
docker save -o local-universe.tar mesosphere/universe:latest && \
gzip local-universe.tar
Start docker registry.
665b10373261ce0ddebbb5de7a23d402b21983f771d25f49e4e1069af7a44528
docker: Error response from daemon: Mounts denied: or-mac/osxfs/#namespaces for more info.
.
q25l17ytv6g8n00000gn/T/tmp2zxkqvbf/registry
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-f.
Traceback (most recent call last):
File "/Users/bneil/src/mesos/universe/docker/local-universe/../../scripts/local-universe.py", line 385, in <module>
sys.exit(main())
File "/Users/bneil/src/mesos/universe/docker/local-universe/../../scripts/local-universe.py", line 83, in main
run_docker_registry(dir_path / pathlib.Path("registry")):
File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 82, in __enter__
return next(self.gen)
File "/Users/bneil/src/mesos/universe/docker/local-universe/../../scripts/local-universe.py", line 234, in run_docker_registry
subprocess.check_call(command)
File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'run', '-d', '-p', '5000:5000', '--name', 'registry', '-v', '/var/folders/hh/0qm8r5h97kq25l17ytv6g8n00000gn/T/tmp2zxkqvbf/registry:/var/lib/registry', 'registry:2.4.1']' returned non-zero exit status 125.
make: *** [local-universe] Error 1
I'll keep messing with the local-universe install script and see what I can do in the interim
Hi @bneil, as described above, I think you'll need to export /var/folders
from File Sharing as well. Unfortunately, the UI for this is not at all obvious as the Finder directory picker insists on resolving symlinks so the only way to do it is to select the line in the GUI list after the last entry and then click on it again to manually edit it and type in /var/folders
. I've added a note to our internal issue regarding the usability of this feature.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked
Expected behavior
Docker start container correctly.
Actual behavior
I build dcos universe under my mac os. I clone the repo from https://github.com/mesosphere/universe and build step by step following the instructions from the doc. When execute
sudo make local-universe
, I get this error:Here is the diagnostic info with ID: AEAB95A6-D4F9-4640-81E8-3901BB0800BE