Bug 1260113 - Docker is appending 'carriage return' char. at the end of each line if --tty is set
Docker is appending 'carriage return' char. at the end of each line if --tty ...
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: smahajan@redhat.com
Luwen Su
: Extras
: 1260111 (view as bug list)
Depends On: 1260111
  Show dependency treegraph
Reported: 2015-09-04 08:34 EDT by Peter Hostačný
Modified: 2016-07-31 21:06 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1260111
Last Closed: 2015-09-30 12:23:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Peter Hostačný 2015-09-04 08:34:37 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

How reproducible:

Steps to Reproduce:
1. $ docker run -t --rm ubuntu:12.04 bash -c 'echo something' | od -c

Actual results:
0000000   s   o   m   e   t   h   i   n   g  \r  \n

Expected results:
0000000   s   o   m   e   t   h   i   n   g  \n

Additional info:
Comment 2 smahajan@redhat.com 2015-09-30 12:23:00 EDT
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.

Comment 3 smahajan@redhat.com 2015-10-01 10:55:23 EDT
*** Bug 1260111 has been marked as a duplicate of this bug. ***
Comment 4 Peter Hostačný 2015-11-09 08:37:12 EST
Not sure if it is expected. Explanation from upstream is a bit strange - trying to reopen upstream issue.
Comment 5 Peter Hostačný 2016-02-08 12:08:12 EST
Issue was reopened. Please take a look on it.
Comment 6 Peter Hostačný 2016-05-09 10:41:35 EDT
Github issue was definitely closed with nice explanation. It is not a docker bug as you wrote but tty's default behavior.

Note You need to log in before you can comment on or make changes to this bug.