Docker Snap - What happens when snap is updated?

Hi,

I consider using Docker snap in production. However I’m worried that the Docker daemon would be restarted automatically once the snap is updated. Is this the case? Or does it get updated once the daemon or the machine is restarted?

Refer [WIP] Refresh App Awareness for a possible solution.

Yes this is true, it will get restarted when updates happen.

This is not a solution, as dockerd in the docker snap is daemon, not an app, and refresh app awareness only applies to apps, not daemons.

Unfortunately, as currently setup, when the docker snap is refreshed, dockerd will stop and restart all running containers. One way to fix this, as lxd does, is to be robust across different versions of docker, and so the snap can specify refresh-mode: endure, which means that snapd will not stop the daemon when a refresh happens, and instead the daemon will keep running, but the daemon must be robust against this situation. I have no idea if dockerd is robust against this situation. I would recommend you to file an issue against https://github.com/docker-snap/docker-snap/issues (which is the new home for docker snap issues/questions) if you are interested in getting the docker snap to do this.

1 Like