使用官方安装脚本自动安装

安装命令如下:

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

也可以使用国内 daocloud 一键安装命令:

curl -sSL https://get.daocloud.io/docker | sh
[root@mcw1 /application]$ curl -sSL https://get.daocloud.io/docker | sh
# Executing docker install script, commit: 93d2499759296ac1f9c510605fef85052a2c32be
+ sh -c 'yum install -y -q yum-utils'
Package yum-utils-1.1.31-54.el7_8.noarch already installed and latest version
+ sh -c 'yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo'
Loaded plugins: fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
+ '[' stable '!=' stable ']'
+ sh -c 'yum makecache'
Loaded plugins: fastestmirror
base                                                                                                                                                       | 3.6 kB  00:00:00     
docker-ce-stable                                                                                                                                           | 3.5 kB  00:00:00     
epel                                                                                                                                                       | 4.7 kB  00:00:00     
extras                                                                                                                                                     | 2.9 kB  00:00:00     
updates                                                                                                                                                    | 2.9 kB  00:00:00     
(1/11): base/7/x86_64/other_db                                                                                                                             | 2.6 MB  00:00:03     
(2/11): epel/x86_64/prestodelta                                                                                                                            |  447 B  00:00:00     
(3/11): epel/x86_64/other_db                                                                                                                               | 3.3 MB  00:00:06     
(4/11): extras/7/x86_64/filelists_db                                                                                                                       | 259 kB  00:00:00     
(5/11): extras/7/x86_64/other_db                                                                                                                           | 145 kB  00:00:00     
(6/11): base/7/x86_64/filelists_db                                                                                                                         | 7.2 MB  00:00:11     
(7/11): updates/7/x86_64/other_db                                                                                                                          | 903 kB  00:00:02     
(8/11): epel/x86_64/filelists_db                                                                                                                           |  12 MB  00:00:15     
(9/11): updates/7/x86_64/filelists_db                                                                                                                      | 7.0 MB  00:00:08     
(10/11): docker-ce-stable/7/x86_64/other_db                                                                                                                | 122 kB  00:00:18     
(11/11): docker-ce-stable/7/x86_64/filelists_db                                                                                                            |  29 kB  00:00:25     
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Metadata Cache Created
+ '[' -n '' ']'
+ sh -c 'yum install -y -q docker-ce'
No Presto metadata available for base
No Presto metadata available for updates
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-20.10.12-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-ce-20.10.12-3.el7.x86_64.rpm is not installed
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
setsebool:  SELinux is disabled.
+ version_gte 20.10
+ '[' -z '' ']'
+ return 0
+ sh -c 'yum install -y -q docker-ce-rootless-extras'
Package docker-ce-rootless-extras-20.10.12-3.el7.x86_64 already installed and latest version

================================================================================

To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:

    dockerd-rootless-setuptool.sh install

Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.


To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/

WARNING: Access to the remote API on a privileged Docker daemon is equivalent
         to root access on the host. Refer to the 'Docker daemon attack surface'
         documentation for details: https://docs.docker.com/go/attack-surface/

================================================================================
命令执行情况

相关文章:

  • 2022-12-23
  • 2021-12-02
  • 2022-02-08
  • 2021-09-19
  • 2022-01-07
  • 2021-05-28
  • 2021-10-01
  • 2021-07-03
猜你喜欢
  • 2021-05-23
  • 2022-02-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案