Docker unbuffered python output to read logs live
Docker image runs a Python script that uses
print() a lot, but
docker logs is silent because python
print() uses buffered output, and it takes minutes to show.
Solution1: tell python not to do that through an environment variable.
docker run --name=myapp -e PYTHONUNBUFFERED=1 -d myappimage