The best way to update docker

Hello,
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

Hi,
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

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

No.

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