Created
July 13, 2017 01:24
-
-
Save raxityo/02021b64e15d51ec11074537a03e0a76 to your computer and use it in GitHub Desktop.
SSH to a docker container by its container_id. Usage: docker-ssh <container_id>.
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 | |
docker-ssh () | |
{ | |
if [[ $1 ]]; then | |
docker exec -it $1 bash | |
else | |
echo "Usage: docker-ssh <container_id>" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment