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

Time:11-23

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.

CodePudding user response:

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

  • Related