The best way to update docker

I am using Docker on Debian. When I use apt update && apt upgrade commands, all containers are stopped after docker is updated. Is this normal?

Thank you.

That’s normal, at least that containers are restarted. They might not be restarted, depending on the individual container restart setting.

But there seems to be a workaround with live restore to keep them running all the time.

1 Like

Thank you so much for your reply.
If I use the restart: always option, will this problem be fixed?

When you update Docker in its default configuration with apt upgrade, all containers will be stopped during that process and should be restarted when using restart: always option.

1 Like

Thanks again.
Is putting "live-restore": true in the daemon.json file the same as using restart: always in the YAML file?


live-restore should enable Docker container to run during Docker update.

restart: always will ensure the container is always started when it fails, when rebooted, after Docker update.

1 Like