Red Hat Bugzilla – Bug 1260113
Docker is appending 'carriage return' char. at the end of each line if --tty is set
Last modified: 2016-07-31 21:06:16 EDT
+++ This bug was initially created as a clone of Bug #1260111 +++
Description of problem:
Running docker run with '-t' flag is printing output with carriage return character at the end of each line. Command launched in container prints an output with normal linux-like line ending, but docker changes it after redirecting output from container to host console.
Version-Release number of selected component (if applicable):
Docker version 1.7.1.fc22, build b6416b7/1.7.1
Steps to Reproduce:
1. $ docker run -t --rm ubuntu:12.04 bash -c 'echo something' | od -c
0000000 s o m e t h i n g \r \n
0000000 s o m e t h i n g \n
This issue was already raised by someone else, and closed by docker.
According to docker, this is expected behavior. So unfortunately this is not upstream able.
*** Bug 1260111 has been marked as a duplicate of this bug. ***
Not sure if it is expected. Explanation from upstream is a bit strange - trying to reopen upstream issue.
Issue was reopened. Please take a look on it.
Github issue was definitely closed with nice explanation. It is not a docker bug as you wrote but tty's default behavior.