Created
April 8, 2016 19:54
-
-
Save luos/a32dae9d0b4496e5caa97411084cdd60 to your computer and use it in GitHub Desktop.
Automatically attach bash to the first docker container - useful for debugging
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 | |
CONTAINER_ID=`docker ps | awk '{ print $1 }' | tail -n +2` | |
docker exec -ti $CONTAINER_ID bash | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment