Skip to content

Instantly share code, notes, and snippets.

@tldrafael
Created March 22, 2021 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tldrafael/f87b9e1c0acd47a226afa9ca4c5fcb79 to your computer and use it in GitHub Desktop.
Save tldrafael/f87b9e1c0acd47a226afa9ca4c5fcb79 to your computer and use it in GitHub Desktop.
export UID=$(id -u)
export GID=$(id -g)
docker run --user $UID:$GID \
--workdir="/home/$USER" \
-v "/etc/group:/etc/group:ro" \
-v "/etc/passwd:/etc/passwd:ro" \
-v "/etc/shadow:/etc/shadow:ro" \
-it $DOCKER_IMAGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment