Restart the Docker service to apply the automatic start and stop command (recommended)

Restart the Docker service to apply the automatic start and stop command (recommended)

Let's take a look at the command to restart the Docker service application. The specific contents are as follows:

#Restart the docker service application and do not automatically start the docker container docker update --restart=no (docker container CONTAINER ID or docekr container NAMES)

#Restart the docker service application and automatically start the docker container docker update --restart=always (docker container CONTAINER ID or docekr container NAMES)

ps: Start the Docker command after the server restarts

Startup steps:

1. Start the Docker daemon

systemctl daemon-reload

2. Docker startup command:

systemctl start docker

3. Check whether the docker service is started

ps -ef |grep docker

4. View the services started by docker:

docker ps

other:

Restart the Docker service

systemctl restart docker

Stop the Docker service

systemctl stop docker

Summarize

The above is the command for restarting the docker service application to start and stop automatically. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time!

You may also be interested in:
  • Detailed explanation of how to enter and exit the Docker container
  • How to create, start, and stop a Docker container
  • How to keep running after exiting Docker container

<<:  Summary of practical skills commonly used in Vue projects

>>:  Briefly explain the use of group by in sql statements

Recommend

Linux gzip command compression file implementation principle and code examples

gzip is a command often used in Linux systems to ...

CSS code to achieve background gradient and automatic full screen

CSS issues about background gradient and automati...

Detailed instructions for installing mysql5.7 database under centos7.2

The mysql on the server is installed with version...

An article to help you understand the basics of VUE

Table of contents What is VUE Core plugins in Vue...

js to realize the mouse following game

This article shares the specific code of js to im...

MySQL query specifies that the field is not a number and comma sql

Core SQL statements MySQL query statement that do...

Why is the MySQL auto-increment primary key not continuous?

Table of contents 1. Introduction 2. Self-increme...

Nginx external network access intranet site configuration operation

background: The site is separated from the front ...

Tutorial on deploying the open source project Tcloud with Docker on CentOS8

1. Install Docker 1. I installed Centos7 in the v...

How to install Nginx in a specified location in Centos system

How to install Nginx in a specified location in C...

Tutorial on installing and configuring remote login to MySQL under Ubuntu

This article shares the MySQL installation and co...

Linux automatic login example explanation

There are many scripts on the Internet that use e...

Nginx anti-crawler strategy to prevent UA from crawling websites

Added anti-crawler policy file: vim /usr/www/serv...