1

Please be advised that I am somewhat of a newbie at Ubuntu system configuration.

I am running the snap- installed docker on Ubuntu desktop V22.04. It is running a number of containers without problems. My containers are all setup (in their docker-compose files) to restart always if for any reason the machine restarts.

Unfortunately, whenever I reboot my Ubuntu machine my containers are not restarting. When I attempt to list the running containers using "docker ps", I get an error message saying:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I can, of course, get things runnung again by doing a "sudo snap disable docker" and then doing "sudo snap enable docker", but this is not a good solution for those times when (for example) I have power hits (my town has one of the worst power grids in the country!) and my system has to automatically restart. I need to be able to somehow make the docker daemon start up automatically upon reboot. More unfortunately: I cannot find any instructions on how to do this!

Does anyone know how to set up an Ubuntu instance so that a docker daemon installed by snap can be made to start up automatically on reboot?

0 Answers0