I am building my first very simple container. The python script simply outputs the message with the number of seconds that have passed.
When I try to read the log using:
docker logs "container name"
I do get the logs, however, it seems like the logs are only sent to the log file at a certain interval. In my case, this interval is about 3.5 minutes. I want there to be a constant stream (so that when the container outputs x, it is immediately written to the log file.
Example of the log with timestamps: (only shows a small part)
...
2022-08-09T09:46:24.677360000Z Waiting for file... 208 seconds passed
2022-08-09T09:46:24.677364500Z Waiting for file... 209 seconds passed
2022-08-09T09:46:24.677369700Z Waiting for file... 210 seconds passed
2022-08-09T09:46:24.677388700Z Waiting for file... 211 seconds passed
2022-08-09T09:46:24.677395900Z Waiting for file... 212 seconds passed
2022-08-09T09:49:54.949131800Z Waiting for file... 213 seconds passed
2022-08-09T09:49:54.949169300Z Waiting for file... 214 seconds passed
2022-08-09T09:49:54.949176000Z Waiting for file... 215 seconds passed
2022-08-09T09:49:54.949180700Z Waiting for file... 216 seconds passed
...