how do i store the logs for a python program in a docker file?

I learnt some how that we can pass multiple volumes. The below command did the magic for me:

sudo docker container run -v /home/uadmin/msw/queuemgr:/queuemgr -v /var/log:/var/log --rm --name publisher queuepublisher

I could run the container with publisher.py successfully. At the same time logging to /var/log folder from publsher.py is successful!

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top