Get the App
SLTechnology News&Howtos  ›  Servers  › 

Methods for docker to restart closed containers

Shulou Source: shulou.com Published: 2022-06-03 05:51:11 09月21日 Update

What the editor shares with you today is how docker restarts closed containers. Docker container instances can be started, stopped, restarted, and so on. Easy to operate and start quickly.

Restart a container

Docker restart container ID or container name: restart the container directly regardless of whether the container is started or not

1. First, docker ps looks at the running container information.

2. Restart the container with docker restart 59ec

3. Docker ps again to view container information

Docker restart parameter

-t: closes the container's time limit. If the timeout fails to close, use kill to force it to close. The default is 10s, which is used to save the container's own state.

Start a container that has stopped

Docker start container ID or container name

1. Check the information of the container instance that has been paused first

two。 Start the container through docker start 59ec

3. View the currently launched container through docker ps

The container cloud is realized by deploying container services on cluster servers through docker technology, with tens of thousands of Linux images, powerful, lightweight and flexible, can be easily used as cluster services, and VPCs can be built freely and easily.

Tags: Container information service instance cluster method convenient powerful free again functional powerful parameter technology time server active state network lightweight Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Information Huawei Xiaomi Apple