Docker number of lines in terminal changing inside docker

后端 未结 6 1654
轮回少年
轮回少年 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:36

    I just tested with version Docker version 18.06.1-ce, build e68fc7a. It seems to have the same problem. However, one of the guys in the github issue gave a practical workaround:

    docker run --rm -it -e COLUMNS=$COLUMNS -e LINES=$LINES -e TERM=$TERM -it ubuntu:16.04 tput lines
    

提交回复
热议问题