Created
May 15, 2014 17:51
-
-
Save dergachev/ff7e30475173eac3ccdb to your computer and use it in GitHub Desktop.
Allows SSH Agent forwarding into docker container
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
# NB: the line with SSH_AUT_SOCK allows SSH Agent forwarding into docker container | |
# NB: umask 002 makes all newly created files group-writable | |
docker-run-with-agent: | |
docker run -t -i \ | |
-v `pwd`/source:/srv/docker-jekyll/source/ \ | |
-v `pwd`/deploy:/srv/docker-jekyll/deploy \ | |
-v `dirname $(SSH_AUTH_SOCK)`:`dirname $(SSH_AUTH_SOCK)` -e SSH_AUTH_SOCK=$(SSH_AUTH_SOCK) \ | |
-p 4000:4000 \ | |
dergachev/docker-jekyll \ | |
/bin/bash -c "umask 002; $(cmd) $(args)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@vasi says this is terrifying