docker-py
docker-py copied to clipboard
Output ignored after last newline character
Hello, it seems that any output from the container after the last newline character is ignored; for instance, if I run:
import docker
client = docker.from_env()
hello_world = client.containers.run('alpine',
'echo Hello world', # Ends with a newline
auto_remove=True)
print(hello_world)
hello_again = client.containers.run('alpine',
'echo -n Hello again', # Doesn't end with a newline
auto_remove=True)
print(hello_again)
Then the output is:
b'Hello world\n'
b''
It seems to be a bug, especially since in the first case, the newline is included in the output; can you please look into it?