When I launch a docker container using
exec command inside tmux, I occasionally experience odd behaviors in terminal:
- The size of terminal within container is not the same as size of tmux pane.
- When I try to search for a command history with the upper arrow key, the searched command would not be displayed in the terminal.
Here is solution for the behavior. I basically pass the size of terminal that a container should create.
docker exec -ti --env COLUMNS=`tput cols` --env LINES=`tput lines` junyonglee_tf /bin/zsh