LoginSignup
13
10

More than 5 years have passed since last update.

docker-compose execでTTYの改行がおかしいとき

Posted at

docker-compose execでコンテナのbashにログインしたとき、現象として長いコマンドを打つと改行されずに、キャレットが同じ行をぐるぐる巡ったり、シェルの右端も短かったりする。

2018-05-14 19_09_34.gif

この解決策としては、ログイン時に環境変数としてCOLUMNSLINESを渡す:

docker-compose exec -e COLUMNS=$(tput cols) -e LINES=$(tput lines) web bash
13
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
10