Skip to content
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

bug in docker.DockerContainer.log() when container run with tty=true #890

Open
idan-rahamim-lendbuzz opened this issue Aug 15, 2024 · 0 comments

Comments

@idan-rahamim-lendbuzz
Copy link

Long story short

I have a container running with tty=true
When i run docker.DockerContainer.log() with tail>1, the output i get is broken.
When i run len() on the list output im getting different results.
When i try to iterate on the list the output is also broken.

There is no such problem if i run the container with tty=false.

How to reproduce

Run container with tty=true

docker = Docker()
container = await docker.containers.get(<container_name>)
result: list[str] = await container.log(stdout=True, stderr=True, tail=5)
print(len(result)) # different output every time

for i in result:
    print i # getting broken output

Your environment

macOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant