Skip to content

Instantly share code, notes, and snippets.

@asterbini
Last active March 10, 2022 18:48
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 asterbini/96c4988e5236fcf85626ca128a564b8b to your computer and use it in GitHub Desktop.
Save asterbini/96c4988e5236fcf85626ca128a564b8b to your computer and use it in GitHub Desktop.
forward ssh authentication inside a running docker container by mounting the SSH_AUTH_SOCKET
docker run --rm -ti \
-v $(SSH_AUTH_SOCKET):/ssh-socket -e SSH_AUTH_SOCKET=/ssh-socket \
--user $UID:$GROUPS \
asterbini/image \
bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment