Python app does not print anything when running detached in docker

前端 未结 11 1512
不思量自难忘°
不思量自难忘° 2020-11-29 16:54

I have a Python (2.7) app which is started in my dockerfile:

CMD [\"python\",\"main.py\"]

main.py prints some strings when it is s

11条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-29 17:15

    Try to add these two environment variables to your solution PYTHONUNBUFFERED=1 and PYTHONIOENCODING=UTF-8

提交回复
热议问题