container.logs seems to no stream logs when the container is started without the tty option
See original GitHub issueI’m not sure if it’s an issue.
I try to stream container logs using the docker-py client.
I noticed I have no logs when my container is started without -t
.
logs = container.logs(stream=True, follow=True, stdout=True, stderr=False, tail=0)
Even if I can show them using this command docker logs -f <container>
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Docker Logs not Readable - Stack Overflow
That output is from an application that expects to write to a tty. This may be a configuration of the application that you...
Read more >Your starter guide to Docker troubleshooting - TechTarget
Without the right tools, Docker troubleshooting can take a lot of time and effort. Read about how to use logs, helpful commands and ......
Read more >docker container - Python on whales - GitHub Pages
Without stream , only a str will be returned, possibly much later in the future. With stream , you'll be able to read...
Read more >Why Does My Docker Container Stop? - Tutorial Works
If there's no terminal attached, then your shell process will exit, and so the container will exit. You can stop this by adding...
Read more >Forwarding Nginx Logs to Docker - Callback Insanity - Medium
It is fairly common practice in Docker to forward the logs from a container's main process (as defined by CMD or ENTRYPOINT instructions)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Run into a similar problem. @TomasTomecek can you explain the difference between the two, and also what’s the difference between
stream
andfollow
? What happens if you specify one or both? Why doesstream
notfollow
? Doesfollow
automaticallystream
? What is returned when both are specified?Yeah the source is pretty confusing too 😦 I’ve hacked a solution, but it looks like the logging part of this library still needs some significant improvements to work reliably.