调用 print 的时候显式刷新 buffer:
print
print("Hello? Anyone there?", flush=True)
设置环境变量:
PYTHONUNBUFFERED =1
... CMD ["python", "-u", "app.py"]