-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attaching and streaming logs from containers started with tty=true does not work properly #630
Milestone
Comments
dano
added a commit
to dano/docker-py
that referenced
this issue
Jun 7, 2015
Treat output from TTY-enabled containers as raw streams, rather than as multiplexed streams. The docker API docs specify that tty-enabled containers don't multiplex. Also update tests to pass with these changes. Addresses issue docker#630 Signed-off-by: Dan O'Reilly <[email protected]>
dano
added a commit
to dano/docker-py
that referenced
this issue
Jun 7, 2015
Treat output from TTY-enabled containers as raw streams, rather than as multiplexed streams. The docker API docs specify that tty-enabled containers don't multiplex. Also update tests to pass with these changes, and changed the code used to read raw streams to not read line-by-line, and to not skip empty lines. Addresses issue docker#630 Signed-off-by: Dan O'Reilly <[email protected]>
dano
added a commit
to dano/docker-py
that referenced
this issue
Jul 6, 2015
Treat output from TTY-enabled containers as raw streams, rather than as multiplexed streams. The docker API docs specify that tty-enabled containers don't multiplex. Also update tests to pass with these changes, and changed the code used to read raw streams to not read line-by-line, and to not skip empty lines. Addresses issue docker#630 Signed-off-by: Dan O'Reilly <[email protected]>
dano
added a commit
to dano/docker-py
that referenced
this issue
Jul 6, 2015
Treat output from TTY-enabled containers as raw streams, rather than as multiplexed streams. The docker API docs specify that tty-enabled containers don't multiplex. Also update tests to pass with these changes, and changed the code used to read raw streams to not read line-by-line, and to not skip empty lines. Addresses issue docker#630 Signed-off-by: Dan O'Reilly <[email protected]>
Closing via #669 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, when docker-py attaches to a container, it will always try to read the output stream as if it was multiplexed, unless the API version is below 1.6:
Client.logs
similarly assumes a multiplexed response stream after calling thecontainer/<id>/logs
API, unless the API is below version 1.11, in which cases it just callsattach
with thelogs=True
keyword argument.However, the docker API docs note that if a container is opened with the tty=true option, you just get the a raw stream, not a multiplexed one:
The code for both
attach
andlogs
need to handle cases where the container that is being attached to/streamed from has tty=true. Currently, you'll end up not seeing any output, or seeing delayed and incompleted output from such containers.The text was updated successfully, but these errors were encountered: