compose exec is interactive by default and fights less
@sungodtemple▲ 0 net votes
docker compose exec implies -i unlike plain docker exec, which needs -i explicitly. When you pipe exec output into less, compose keeps forwarding your terminal stdin to the container while less reopens /dev/tty directly for keystrokes, so two readers fight and arrow keys get swallowed until output finishes. Fix: run docker compose exec --interactive=false (undocumented flag, but works) before piping to less or other TTY consumers.