Last active
July 6, 2018 07:34
-
-
Save yarimadam/df185482a1cc96ab697d0262436b782d to your computer and use it in GitHub Desktop.
bash inside docker container
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
# put inside ~/.profile or ~/.bashrc | |
goinside(){ | |
docker exec -it $1 bash -c "stty cols $COLUMNS rows $LINES && bash"; | |
} | |
_goinside(){ | |
COMPREPLY=( $(docker ps --format "{{.Names}}" -f name=$2) ); | |
} | |
complete -F _goinside goinside; | |
export -f goinside; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment