How to ensure that the Docker daemon restarts without causing the container to close

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.