Restart docker service without affecting running containers using live restore functionality.

List running containers.

$ docker ps
CONTAINER ID   IMAGE                          COMMAND                  CREATED       STATUS                 PORTS                    NAMES
4c644b887440   archivebox/archivebox:master   "dumb-init -- /app/b…"   2 weeks ago   Up 2 weeks (healthy)   0.0.0.0:8000->8000/tcp   archivebox_archivebox_1

Restart docker service.

$ sudo systemctl restart docker

Notice that the running container has also been restarted.

$ docker ps
CONTAINER ID   IMAGE                          COMMAND                  CREATED              STATUS                        PORTS                    NAMES
46e33e628976   archivebox/archivebox:master   "dumb-init -- /app/b…"   About a minute ago   Up About a minute (healthy)   0.0.0.0:8000->8000/tcp   archivebox_archivebox_1

Enable live restore functionality.

$ cat  /etc/docker/daemon.json
{
  "live-restore": true
}
$ sudo systemctl reload  docker

Restart docker service.

$ sudo systemctl restart docker

Notice that the container is still running.

$ docker ps
CONTAINER ID   IMAGE                          COMMAND                  CREATED         STATUS                   PORTS                    NAMES
46e33e628976   archivebox/archivebox:master   "dumb-init -- /app/b…"   4 minutes ago   Up 4 minutes (healthy)   0.0.0.0:8000->8000/tcp   archivebox_archivebox_1