Objective
Usually in the Docker experiment, you will often need to modify some configuration parameters, some parameters modified, it is necessary to restart the Docker background process daemon to take effect, but after the Docker daemon restarts, may cause the running container to force shutdown. This is inconvenient if the container is running an important test. Therefore, it is necessary to understand how to make the Docker daemon in the case of a reboot, the container will not be forced to shut down, keep running.
Server environment
Ubuntu 14.04
Docker 17.12.0-ce
Modify the Docker configuration file
sudo vim /etc/docker/daemon.json添加"live-restore": true选项,比如:{ "live-restore": true,}
Description: In the machine I do the test, there is no extra configuration, if your machine has, please add on it.
Restart
suo service docker restart
How to ensure that the Docker daemon restarts without causing the container to close