I'm testing Wordpress docker on an Amazon EC2 machine. yesterday, all file based changes (like plugins, themes, etc) were gone. The Ec2 machine is up for 8 days, other containers are also up for 8 days, but the Wordpress container is like created 20 hours ago.
I'm not asking about volume mapping etc, I know that to really persist file changes in a container we should use volumes, my question is:
- 1-On what events the container is re-created? We've not used
docker runwhen it's bee re-created
- How can we see a log of all the events happening on the docker (and not in specific containers)?
journalctl -u docker.service:
Jun 11 16:05:44 ip-172-31-39-113 dockerd: time="2019-06-11T16:05:44.328303723Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete Jun 13 04:05:30 ip-172-31-39-113 dockerd: time="2019-06-13T04:05:30.306067658Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete Jun 13 13:40:31 ip-172-31-39-113 systemd: Stopping Docker Application Container Engine... Jun 13 13:40:31 ip-172-31-39-113 dockerd: time="2019-06-13T13:40:31.557328738Z" level=info msg="Processing signal 'terminated'"
Only the second line is almost at the time container has been deleted and re-created
docker ps -a:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3aebfdef77c8 wordpress:latest "docker-entrypoint.s…" 24 hours ago Exited (0) 15 hours ago site-wordpress