shiplift icon indicating copy to clipboard operation
shiplift copied to clipboard

container logs does not work if tty is enabled

Open cswinter opened this issue 4 years ago • 1 comments
trafficstars

When querying logs for containers with a tty, the logs stream is not multiplexed via headers but just returns the raw output: https://github.com/docker/cli/blob/86e1f04b5f115fb0b4bbd51e0e4a68233072d24b/vendor/github.com/docker/docker/client/container_logs.go#L19 The current logs implementation will parse random STDOUT data as a length header and then tries to perform a read_exact with usually an unreasonably large length which runs into EOF error. The observed behavior is that logs immediately exits without returning any output.

cswinter avatar May 20 '21 02:05 cswinter

Identical issue encountered by docker-py: https://github.com/docker/docker-py/issues/630

cswinter avatar May 20 '21 02:05 cswinter