Skip to content

Instantly share code, notes, and snippets.

@lloiacono
Last active June 6, 2018 12:13
Show Gist options
  • Save lloiacono/4b8e46469a11b752c1632e36aa473883 to your computer and use it in GitHub Desktop.
Save lloiacono/4b8e46469a11b752c1632e36aa473883 to your computer and use it in GitHub Desktop.
Docker terminal columns fix
docker run -it -e COLUMNS="`tput cols`" -e LINES="`tput lines`" some_container /bin/bash
or add to .zshrc
goinside(){
docker exec -it $1 bash -c "stty cols $COLUMNS rows $LINES && bash";
}
export -f goinside
#https://stackoverflow.com/questions/38786615/docker-number-of-lines-in-terminal-changing-inside-docker/49281526#49281526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment