Skip to content

Instantly share code, notes, and snippets.

@mckelvin
Created April 11, 2017 03:57
Show Gist options
  • Save mckelvin/007a94a743a33169eff510da12fdc78b to your computer and use it in GitHub Desktop.
Save mckelvin/007a94a743a33169eff510da12fdc78b to your computer and use it in GitHub Desktop.
#!/bin/bash
# credits: https://github.com/kubernetes/kubernetes/issues/13585#issuecomment-215615891
if [ $# -eq 0 ]; then
echo "Usage: dshell <container>"
exit 1
fi
COLUMNS=`tput cols`
LINES=`tput lines`
TERM=xterm
docker exec -i -t -e COLUMNS=$COLUMNS -e LINES=$LINES -e TERM=$TERM $@ bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment