The issue drove me crazy all the time the last month or so.
Docker tty became to wrap the line to 80 symbols when using it in interactive mode.
The only one solution I've found so far is to add line
export COLUMNS=120 to the end of
~/.bashrc file in container. So the number of symbols to wrap to became 120. But it was not still so comfortable for me to work with it cause the line got still wrapped.
This guy just saved my day with his post on github: https://github.com/docker/compose/issues/253#issuecomment-361888888
He wrote: all you need to do is to resize the terminal window after attaching to the container. And that's all! The problem is fixed.