2021-08-20 12:21:38 +00:00
|
|
|
---
|
|
|
|
author: Alvie Rahman
|
|
|
|
date: \today
|
|
|
|
title: Python
|
2022-03-02 01:43:54 +00:00
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
- python
|
|
|
|
- programming
|
|
|
|
- io
|
|
|
|
uuid: cd5c50f9-66f4-4a3b-b89a-04a20ecd642b
|
2021-08-20 12:21:38 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Issues
|
|
|
|
|
|
|
|
## No log output when running in docker
|
|
|
|
|
|
|
|
Change line beginning with `CMD` from:
|
|
|
|
|
|
|
|
```Dockerfile
|
|
|
|
CMD [ "python", "app.py" ]
|
|
|
|
```
|
|
|
|
|
|
|
|
to:
|
|
|
|
|
|
|
|
```Dockerfile
|
|
|
|
CMD [ "python", "-u", "app.py" ]
|
|
|
|
```
|
|
|
|
|
|
|
|
This disabled output buffering (stdout and stderr).
|
|
|
|
|