Last active
June 6, 2018 12:13
-
-
Save lloiacono/4b8e46469a11b752c1632e36aa473883 to your computer and use it in GitHub Desktop.
Docker terminal columns fix
This file contains hidden or 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
| 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