Search code examples
dockerros

GUI's with Docker


Im trying to run a GUI within Docker and trying to following the below link.

http://wiki.ros.org/docker/Tutorials/GUI#The_safer_way

Using this link, Im trying to implement the the_safer_way method but get the following error in my MAC.

Ps-MacBook-Pro:~ p$ docker run -it \
>     --user=$USER \
>     --env="DISPLAY" \
>     --volume="/etc/group:/etc/group:ro" \
>     --volume="/etc/passwd:/etc/passwd:ro" \
>     --volume="/etc/shadow:/etc/shadow:ro" \
>     --volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
>     --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
>     osrf/ros:indigo-desktop-full \
>     rqt
docker: Error response from daemon: Mounts denied: 
The path /etc/sudoers.d
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.

Solution

  • Did you tried to read https://docs.docker.com/docker-for-mac/osxfs/#namespaces ?

    By default, you can share files in /Users/, /Volumes/, /private/, and /tmp directly. To add or remove directory trees that are exported to Docker, use the File sharing tab in Docker preferences