Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Docker container log files are lost after every deploy from Gitlab runner

Everytime is run a Pipline, the gitlab runner will create a new docker contrainer, the log files from the lastly created docker will be lost!
I want to keep a log history for 3 Monthes at minimum.

I don’t want to lose the logs of my docker container after every delpoy from gitlab runner.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Actually they are not lost, all logs can be found here /var/lib/docker/containers/<container_id>/<container_id>-json.log. No need to blame gitlab runner for that, it just creates new container for you. If you want to keep history of logs, it will be wise to store them somewhere else. For example very popular solution will be use ELK stack

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading