shiplift
shiplift copied to clipboard
container logs does not work if tty is enabled
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.
Identical issue encountered by docker-py: https://github.com/docker/docker-py/issues/630