Detailed explanation of CentOS7 online installation of Docker 17.03.2 using Alibaba Cloud Docker Yum source

Detailed explanation of CentOS7 online installation of Docker 17.03.2 using Alibaba Cloud Docker Yum source

Reference Documentation

Official Docker installation documentation: https://docs.docker.com/install/linux/docker-ce/centos

Alibaba Cloud Docker installation document: https://yq.aliyun.com/articles/110806

Install Docker with one click

https://github.com/cookcodeblog/OneDayDevOps/blob/master/components/docker/install_docker_ce.sh

Installation Steps

Removing an installed Docker

# Uninstall installed docker
sudo yum remove docker \
         docker-client \
         docker-client-latest \
         docker-common \
         docker-latest \
         docker-latest-logrotate \
         docker-logrotate \
         docker-selinux \
         docker-engine-selinux \
         docker-engine

Configure Alibaba Cloud Docker Yum source

# Set up repository
sudo yum install -y yum-utils device-mapper-persistent-data lvm2

# Use Aliyun Docker
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Install the specified version

Check the Docker version:

yum list docker-ce --showduplicates

When installing an older version (such as Docker 17.03.2), you need to specify the full rpm package name and add the --setopt=obsoletes=0 parameter:

# Install docker
# on a new system with yum repo defined, forcing older version and ignoring obsoletes introduced by 17.06.0
yum install -y --setopt=obsoletes=0 \
  docker-ce-17.03.2.ce-1.el7.centos.x86_64 \
  docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch

Or when installing a newer version of Docker (such as Docker 18.03.0), add the version number part of the rpm package name:

sudo yum install docker-ce-18.03.0.ce

Or install the latest version of Docker without adding the version number:

sudo yum install docker-ce

Start the Docker service

# Start docker service
systemctl enable docker
systemctl start docker

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of configuring Docker's yum source and installing it in CentOS7
  • 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
  • How to install docker using YUM

<<:  Vue project implements left swipe delete function (complete code)

>>:  Summary of the use of special operators in MySql

Recommend

Detailed explanation of the use of stat function and stat command in Linux

stat function and stat command Explanation of [in...

Use of Linux chkconfig command

1. Command Introduction The chkconfig command is ...

Causes and solutions to the garbled character set problem in MySQL database

Preface Sometimes when we view database data, we ...

Example of using mycat to implement MySQL database read-write separation

What is MyCAT A completely open source large data...

How to use JSX in Vue

What is JSX JSX is a syntax extension of Javascri...

What is Nginx load balancing and how to configure it

What is Load Balancing Load balancing is mainly a...

MySQL calculates the number of days, months, and years between two dates

The MySQL built-in date function TIMESTAMPDIFF ca...

TortoiseSvn Little Turtle Installation Latest Detailed Graphics Tutorial

There were always problems when installing tortoi...

How to start a Vue.js project

Table of contents 1. Node.js and Vue 2. Run the f...

Vue2.x - Example of using anti-shake and throttling

Table of contents utils: Use in vue: explain: Ima...

How familiar are you with pure HTML tags?

The following HTML tags basically include all exis...

Detailed explanation of the principle and function of JavaScript closure

Table of contents Introduction Uses of closures C...

The difference and usage of Vue2 and Vue3 brother component communication bus

Table of contents vue2.x vue3.x tiny-emitter plug...