Docker number of lines in terminal changing inside docker

后端 未结 6 1647
轮回少年
轮回少年 2020-12-13 09:00

I would like to know how to change the following behavior. Let\'s say my terminal has 28 lines. Then I use the following commands:

$ tput li         


        
6条回答
  •  时光取名叫无心
    2020-12-13 09:59

    A nice way to run bash inside the container without encountering line problems is here:

    docker exec -e COLUMNS="`tput cols`" -e LINES="`tput lines`" -ti container bash
    

提交回复
热议问题