How to install docker


1. connect to the remote server

Use the following command to connect to the remote server

SSH [email protected] server ip/ domain name

2. install docker

(1) Install required packages

yum install -y yum-utils device-mapper-persistent-data lvm2

(2) Set the yum domestic image source (select one)

//Official source address (relatively slow)
$ sudo yum-config-manager --add-repo
$ sudo yum-config-manager --add-repo
//Tsinghua University source 
$ sudo yum-config-manager --add-repo

(3) Install docker -ce using Yum instructions

yum install docker-ce

Note that the command Yum install docker cannot be used here because it will make the system think that we want to install podman docker

If you have installed podman docker by mistake, you can remove it and reinstall the article

The command to delete podman docker is dnf remove podman

(4) Start docker and add boot auto start

 systemctl start docker
//Join auto start
 systemctl enable  docker
//Docker version
 docker version

3. uninstall docker

(1) Remove installation package

yum remove docker-ce

(2) Delete images, containers, configuration files, etc.:

rm -rf /var/lib/docker


Recommended Today

How to write an avatar component with ripple effect by using react

Author: stony Chen Take a look at the final effect first, as shown in the following figure: We refer to the component effect and style…However, component properties are somewhat different from material UI. In addition, we also made an additional ripple effect surrounded by avatar components. List of components and attributes to be completed: Step […]