Created
October 31, 2015 02:47
-
-
Save htchaan/554f1c81087498aaaf5d to your computer and use it in GitHub Desktop.
Shorthand to docker exec
This file contains 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
#!/bin/bash | |
function de() { | |
ssh -t -i "$DOCKER_CERT_PATH/id_rsa" -p 22 \ | |
-l $(jq -r '.Driver.SSHUser' "$DOCKER_CERT_PATH/config.json") \ | |
$(jq -r '.Driver.IPAddress' "$DOCKER_CERT_PATH/config.json") \ | |
"docker exec $@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment