Docker container stopped after few days

Running 38.20230430.3.1 (CoreOS) with docker in it and a few containers. I don’t use the containers that often, maybe a few times a month. I noticed that sometimes all containers are down. When I then login to CoreOS, run “docker ps” it takes some time and then it shows all containers running with about 12sec uptime and then my containers are indeed working again, publishing their websites in them.

The VM in which CoreOS is running hasn’t been rebooted or moved in that time and I can’t figure out why the containers were down.

How can I check:

  • if there are automatic updates for the OS that cause the OS to reboot without me seeing it?
  • if docker crashed for some reason?

Journalctl log is so long, I have a hard time filtering it to find the cause of this.

Hmm. Fedora CoreOS updates are released approximately every two weeks and by default they will be applied automatically and the system will reboot itself. If you only use this system occasionally it’s probably been updated in the time between accesses.

I suspect what’s happening here is docker.service isn’t enabled by default. When you run docker ps it starts the service up (it’s socket activated) and then you see what you expect. This is why it appears to “take some time” when you run it.

Can you make sure the docker.service is enabled?

1 Like

Indeed docker was disabled. So you train of thoughts makes perfect sense on why this is happening. Now enabled docker and will see if it keeps running now.

Thank you