How to install docker using YUM

How to install docker using YUM

As shown in the following figure:

insert image description here

If the version is Centos 7.0 or above, it will be fine.
The command to view the current system kernel version is as follows:

uname -r

The running results are as follows:

å¨è¿ éæå¥å¾çæè¿ °

Step 2: Clean up the installed docker (if you have not installed it, you can skip this step)

The cleanup commands are as follows:

yum remove docker \
         docker-client \         
				 docker-client-latest \
         docker-common \
         docker-latest \
         docker-latest-logrotate \
         docker-logrotate \
         docker-selinux \
         docker-engine-selinux \
         docker-engine

Step 3: Install the Device Mapper tool

The installation command is as follows:

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

Step 4: Configure Docker's yum data source

Configure the yum data source command as follows:

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

The configuration is successful as shown below:

å¨è¿ éæå¥å¾çæè¿ °

Step 5: Update the yum cache

The command is as follows:

yum makecache fast

Step 6: Install docker-ce (community edition)

The installation command is as follows:

 yum -y install docker-ce

Step 7: Start Docker

The startup command is as follows:

systemctl start docker

Startup

systemctl enable docker.service

Restart:

systemctl restart docker

Start the container and add --restart=always

no does not automatically restart the container. (default value)

on-failure The container exits due to an error (the container exit status is not 0) and restarts the container

Unless-stopped restarts the container only when the container has been stopped or Docker is stopped/restarted

Always restart the container when the container has been stopped or Docker is stopped/restarted

If the project has been run, use update to update

docker update --restart=always container name

After startup, you can use the following command to verify

 docker -v

The results are as follows:

å¨è¿ éæå¥å¾çæè¿ °

This is the end of this article about how to install docker using YUM. For more information about installing docker with YUM, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of configuring Docker's yum source and installing it in CentOS7
  • Detailed explanation of CentOS7 online installation of Docker 17.03.2 using Alibaba Cloud Docker Yum source
  • Install docker offline by downloading rpm and related dependencies using yum
  • Detailed code of the example of downloading the docker installation package from yum and installing it on an offline machine
  • How to configure the docker official source and install docker with yum

<<:  Understand the difference between BR and P tags through examples

>>:  CSS3 achieves various border effects

Recommend

Detailed explanation of fs module and Path module methods in Node.js

Overview: The filesystem module is a simple wrapp...

MySQL 5.6.23 Installation and Configuration Environment Variables Tutorial

This article shares the installation and configur...

Creative opening effect achieved by combining CSS 3.0 with video

Let me share with you a creative opening realized...

Detailed tutorial on how to delete Linux users using userdel command

What is serdel userdel is a low-level tool for de...

Optimizing the slow query of MySQL aggregate statistics data

Written in front When we operate the database in ...

JavaScript super detailed implementation of web page carousel

Table of contents Creating HTML Pages Implement t...

Solve the abnormal error when building vue environment with webpack

Table of contents First, configure package.json T...

MySQL 8.0.21.0 Community Edition Installation Tutorial (Detailed Illustrations)

1. Download MySQL Log in to the MySQL official we...

JS realizes automatic playback of timeline

Recently, I have implemented such an effect: clic...

How to deploy the crownblog project to Alibaba Cloud using docker

Front-end project packaging Find .env.production ...

How to use MyCat to implement MySQL master-slave read-write separation in Linux

Table of contents Linux-Use MyCat to implement My...

MySql index improves query speed common methods code examples

Use indexes to speed up queries 1. Introduction I...

28 Famous Blog Redesign Examples

1. WebDesignerWall 2. Veerle's Blog 3. Tutori...