As the title indicates I have a bunch of containers that are set to restart always. Everything works fine as it is but things seem to go wrong when I restart the server (Ubuntu 20.04).
The containers are in fact restarting on reboot since I see them running in top
or htop
and see them using the ports using lsof
but running a docker ps
doesn't show any containers. The containers aren't accessible either from the outside. So they are running but not running at the same time.
What seems to be the only fix for this is to manually restart the docker engine (systemctl restart docker
) which restarts them as the correct user and makes them show up under docker ps
again.
Does anyone know what might be wrong? I've been using docker for years and this is the first time I'm experiencing this issue on a server. I already tried completely reinstalling ubuntu since I thought it could be a deeper underlying issue but after a complete reinstallation the problem is still there.