Skip to content

Instantly share code, notes, and snippets.

@htchaan
Created October 31, 2015 02:47
Show Gist options
  • Save htchaan/554f1c81087498aaaf5d to your computer and use it in GitHub Desktop.
Save htchaan/554f1c81087498aaaf5d to your computer and use it in GitHub Desktop.
Shorthand to docker exec
#!/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