Using GUI's with Docker (http://wiki.ros.org/docker/Tutorials/GUI)

asked 2017-05-11 04:24:28 -0600

xavi gravatar image

(Ref: http://wiki.ros.org/docker/Tutorials/GUI ) First of all, thank you for this wonderul tutorial, which I find very useful. When trying to go for the method "2. The safer way" I came up with an issue in which I was not able to acces to a user contained in my host /etc/passwd within the container. The container mounted the volume "/etc/passwd" but when accessing to the container with the parameter " --user=$USER" it raises the error:

"docker: Error response from daemon: linux spec user: unable to find user john: no matching entries in passwd file."

but if I access to the container with the user "docker" I can access and I can see the "/etc/passwd" containing the data of my host. The only way I could overcome this issue was using this:

--user=$( id -u $USER ):$( id -g $USER ) \

I'm not sure about the rationale behind it (maybe someone else can explain it) but it works and maybe is a more portable way than the method described in the tutorial.

Hope this helps to others

edit retag flag offensive close merge delete

Comments

I wrote some of that wiki some time ago from my experience with with https://github.com/sameersbn/docker-b... when I got started. The entrypoint for the project has gotten a fair bit more complex. If you could update that wiki section with something better, it would be much appreciated!

ruffsl gravatar imageruffsl ( 2017-05-22 22:42:49 -0600 )edit