Last active
April 22, 2019 18:29
-
-
Save nitrobin/4d16fbe347c150a422ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://wiki.ros.org/docker/Tutorials/GUI | |
# mount /etc/group and /etc/passwd read only | |
# set user from $USER | |
docker run -ti --rm -v $(pwd):/tmp/hx -w /tmp/hx -v /etc/group:/etc/group:ro -v /etc/passwd:/etc/passwd:ro —user=$USER debian:jessie |
-u=$UID:$(id -g $USER)
I am getting I have no name! as the username inside docker :(
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can even avoid to mount the passwd and group files. The user will be not recognized in the container but outside everything will be fine and however you can run whatever you want.