Prevent docker logs from being deleted at container restart
Reading the documentation of the ansible module for running docker containers, it turns out that in the currently used Ansible version, the option auto_remove
is set to yes
by default. This might be a sensible default for avoiding disk space pollution but result in loosing all the logs messages. I think we should:
- explicitly set the
auto_remove
option for future memory; - if we chose to keep it on
yes
, then implement a way to make the logs permanent (e.g. by writing them on a mounted disk);