[新手村]centos7.9安装docker

news/2023/9/27 6:28:55
  1. 先安装yum-utils工具
    yum install yum-utils -y
[root@master01-k ~]# yum install yum-utils
Loaded plugins: fastestmirror
Determining fastest mirrors* base: ftp.sjtu.edu.cn* extras: ftp.sjtu.edu.cn* updates: ftp.sjtu.edu.cn
base                                                                                                                                                                                   | 3.6 kB  00:00:00
extras                                                                                                                                                                                 | 2.9 kB  00:00:00
updates                                                                                                                                                                                | 2.9 kB  00:00:00
(1/4): base/7/x86_64/group_gz                                                                                                                                                          | 153 kB  00:00:00
(2/4): extras/7/x86_64/primary_db                                                                                                                                                      | 249 kB  00:00:00
(3/4): base/7/x86_64/primary_db                                                                                                                                                        | 6.1 MB  00:00:01
(4/4): updates/7/x86_64/primary_db                                                                                                                                                     |  21 MB  00:00:01
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-54.el7_8 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-54.el7_8.noarch
--> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-54.el7_8.noarch
--> Running transaction check
---> Package libxml2-python.x86_64 0:2.9.1-6.el7_9.6 will be installed
--> Processing Dependency: libxml2 = 2.9.1-6.el7_9.6 for package: libxml2-python-2.9.1-6.el7_9.6.x86_64
---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed
--> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.el7.noarch
--> Running transaction check
---> Package libxml2.x86_64 0:2.9.1-6.el7.5 will be updated
---> Package libxml2.x86_64 0:2.9.1-6.el7_9.6 will be an update
---> Package python-chardet.noarch 0:2.2.1-3.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved==============================================================================================================================================================================================================Package                                              Arch                                         Version                                                Repository                                     Size
==============================================================================================================================================================================================================
Installing:yum-utils                                            noarch                                       1.1.31-54.el7_8                                        base                                          122 k
Installing for dependencies:libxml2-python                                       x86_64                                       2.9.1-6.el7_9.6                                        updates                                       247 kpython-chardet                                       noarch                                       2.2.1-3.el7                                            base                                          227 kpython-kitchen                                       noarch                                       1.1.1-5.el7                                            base                                          267 k
Updating for dependencies:libxml2                                              x86_64                                       2.9.1-6.el7_9.6                                        updates                                       668 kTransaction Summary
==============================================================================================================================================================================================================
Install  1 Package  (+3 Dependent packages)
Upgrade             ( 1 Dependent package)Total download size: 1.5 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/base/packages/python-kitchen-1.1.1-5.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY                                ]  0.0 B/s |    0 B  --:--:-- ETA
Public key for python-kitchen-1.1.1-5.el7.noarch.rpm is not installed
(1/5): python-kitchen-1.1.1-5.el7.noarch.rpm                                                                                                                                           | 267 kB  00:00:00
(2/5): python-chardet-2.2.1-3.el7.noarch.rpm                                                                                                                                           | 227 kB  00:00:00
(3/5): yum-utils-1.1.31-54.el7_8.noarch.rpm                                                                                                                                            | 122 kB  00:00:00
Public key for libxml2-python-2.9.1-6.el7_9.6.x86_64.rpm is not installed
(4/5): libxml2-python-2.9.1-6.el7_9.6.x86_64.rpm                                                                                                                                       | 247 kB  00:00:00
(5/5): libxml2-2.9.1-6.el7_9.6.x86_64.rpm                                                                                                                                              | 668 kB  00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                         1.8 MB/s | 1.5 MB  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5Package    : centos-release-7-9.2009.0.el7.centos.x86_64 (@anaconda)From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]:  y
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionUpdating   : libxml2-2.9.1-6.el7_9.6.x86_64                                                                                                                                                             1/6Installing : libxml2-python-2.9.1-6.el7_9.6.x86_64                                                                                                                                                      2/6Installing : python-chardet-2.2.1-3.el7.noarch                                                                                                                                                          3/6Installing : python-kitchen-1.1.1-5.el7.noarch                                                                                                                                                          4/6Installing : yum-utils-1.1.31-54.el7_8.noarch                                                                                                                                                           5/6Cleanup    : libxml2-2.9.1-6.el7.5.x86_64                                                                                                                                                               6/6Verifying  : python-chardet-2.2.1-3.el7.noarch                                                                                                                                                          1/6Verifying  : libxml2-2.9.1-6.el7_9.6.x86_64                                                                                                                                                             2/6Verifying  : libxml2-python-2.9.1-6.el7_9.6.x86_64                                                                                                                                                      3/6Verifying  : python-kitchen-1.1.1-5.el7.noarch                                                                                                                                                          4/6Verifying  : yum-utils-1.1.31-54.el7_8.noarch                                                                                                                                                           5/6Verifying  : libxml2-2.9.1-6.el7.5.x86_64                                                                                                                                                               6/6Installed:yum-utils.noarch 0:1.1.31-54.el7_8Dependency Installed:libxml2-python.x86_64 0:2.9.1-6.el7_9.6                                python-chardet.noarch 0:2.2.1-3.el7                                python-kitchen.noarch 0:1.1.1-5.el7Dependency Updated:libxml2.x86_64 0:2.9.1-6.el7_9.6Complete!
  1. 配置docker官方的yum库
    yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
[root@master01-k ~]# 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
  1. 查看docker版本
    yum list docker-ce --showduplicates |sort -r
[root@master01-k ~]# yum list docker-ce --showduplicates |sort -r* updates: ftp.sjtu.edu.cn
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror* extras: ftp.sjtu.edu.cn
docker-ce.x86_64            3:24.0.2-1.el7                      docker-ce-stable
docker-ce.x86_64            3:24.0.1-1.el7                      docker-ce-stable
docker-ce.x86_64            3:24.0.0-1.el7                      docker-ce-stable
docker-ce.x86_64            3:23.0.6-1.el7                      docker-ce-stable
docker-ce.x86_64            3:23.0.5-1.el7                      docker-ce-stable
docker-ce.x86_64            3:23.0.4-1.el7                      docker-ce-stable
docker-ce.x86_64            3:23.0.3-1.el7                      docker-ce-stable
docker-ce.x86_64            3:23.0.2-1.el7                      docker-ce-stable
docker-ce.x86_64            3:23.0.1-1.el7                      docker-ce-stable
docker-ce.x86_64            3:23.0.0-1.el7                      docker-ce-stable
docker-ce.x86_64            3:20.10.9-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.8-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.7-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.6-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.5-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.4-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.3-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.24-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.2-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.23-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.22-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.21-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.20-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.19-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.18-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.17-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.16-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.15-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.14-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.1-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.13-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.12-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.11-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.10-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.0-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.9-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.8-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.7-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.6-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.5-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.4-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.3-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.2-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.15-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.14-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.1-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.13-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.12-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.11-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.10-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.0-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.9-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.8-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.7-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.6-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.5-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.4-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.3-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.2-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.1-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.0-3.el7                     docker-ce-stable
docker-ce.x86_64            18.06.3.ce-3.el7                    docker-ce-stable
docker-ce.x86_64            18.06.2.ce-3.el7                    docker-ce-stable
docker-ce.x86_64            18.06.1.ce-3.el7                    docker-ce-stable
docker-ce.x86_64            18.06.0.ce-3.el7                    docker-ce-stable
docker-ce.x86_64            18.03.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            18.03.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.12.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.12.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.09.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.09.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.06.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.06.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.06.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.3.ce-1.el7                    docker-ce-stable
docker-ce.x86_64            17.03.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.0.ce-1.el7.centos             docker-ce-stable* base: ftp.sjtu.edu.cn
Available Packages
  1. 安装指定版本
    yum install docker-ce-24.0.2-1.el7 -y
    如果不指定版本则安装最新版本,按需安装
[root@master01-k ~]# yum install docker-ce
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: ftp.sjtu.edu.cn* extras: ftp.sjtu.edu.cn* updates: ftp.sjtu.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 3:24.0.2-1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-24.0.2-1.el7.x86_64
--> Processing Dependency: containerd.io >= 1.6.4 for package: 3:docker-ce-24.0.2-1.el7.x86_64
--> Processing Dependency: docker-ce-cli for package: 3:docker-ce-24.0.2-1.el7.x86_64
--> Processing Dependency: docker-ce-rootless-extras for package: 3:docker-ce-24.0.2-1.el7.x86_64
--> Processing Dependency: libcgroup for package: 3:docker-ce-24.0.2-1.el7.x86_64
--> Running transaction check
---> Package container-selinux.noarch 2:2.119.2-1.911c772.el7_8 will be installed
--> Processing Dependency: policycoreutils-python for package: 2:container-selinux-2.119.2-1.911c772.el7_8.noarch
---> Package containerd.io.x86_64 0:1.6.21-3.1.el7 will be installed
---> Package docker-ce-cli.x86_64 1:24.0.2-1.el7 will be installed
--> Processing Dependency: docker-buildx-plugin for package: 1:docker-ce-cli-24.0.2-1.el7.x86_64
--> Processing Dependency: docker-compose-plugin for package: 1:docker-ce-cli-24.0.2-1.el7.x86_64
---> Package docker-ce-rootless-extras.x86_64 0:24.0.2-1.el7 will be installed
--> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-24.0.2-1.el7.x86_64
--> Processing Dependency: slirp4netns >= 0.4 for package: docker-ce-rootless-extras-24.0.2-1.el7.x86_64
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
--> Running transaction check
---> Package docker-buildx-plugin.x86_64 0:0.10.5-1.el7 will be installed
---> Package docker-compose-plugin.x86_64 0:2.18.1-1.el7 will be installed
---> Package fuse-overlayfs.x86_64 0:0.7.2-6.el7_8 will be installed
--> Processing Dependency: libfuse3.so.3(FUSE_3.2)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
--> Processing Dependency: libfuse3.so.3(FUSE_3.0)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
--> Processing Dependency: libfuse3.so.3()(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
---> Package policycoreutils-python.x86_64 0:2.5-34.el7 will be installed
--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
---> Package slirp4netns.x86_64 0:0.4.3-4.el7_8 will be installed
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed
---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed
---> Package fuse3-libs.x86_64 0:3.6.1-4.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved==============================================================================================================================================================================================================Package                                                 Arch                                 Version                                                    Repository                                      Size
==============================================================================================================================================================================================================
Installing:docker-ce                                               x86_64                               3:24.0.2-1.el7                                             docker-ce-stable                                24 M
Installing for dependencies:audit-libs-python                                       x86_64                               2.8.5-4.el7                                                base                                            76 kcheckpolicy                                             x86_64                               2.5-8.el7                                                  base                                           295 kcontainer-selinux                                       noarch                               2:2.119.2-1.911c772.el7_8                                  extras                                          40 kcontainerd.io                                           x86_64                               1.6.21-3.1.el7                                             docker-ce-stable                                34 Mdocker-buildx-plugin                                    x86_64                               0.10.5-1.el7                                               docker-ce-stable                                12 Mdocker-ce-cli                                           x86_64                               1:24.0.2-1.el7                                             docker-ce-stable                                13 Mdocker-ce-rootless-extras                               x86_64                               24.0.2-1.el7                                               docker-ce-stable                               9.1 Mdocker-compose-plugin                                   x86_64                               2.18.1-1.el7                                               docker-ce-stable                                12 Mfuse-overlayfs                                          x86_64                               0.7.2-6.el7_8                                              extras                                          54 kfuse3-libs                                              x86_64                               3.6.1-4.el7                                                extras                                          82 klibcgroup                                               x86_64                               0.41-21.el7                                                base                                            66 klibsemanage-python                                      x86_64                               2.5-14.el7                                                 base                                           113 kpolicycoreutils-python                                  x86_64                               2.5-34.el7                                                 base                                           457 kpython-IPy                                              noarch                               0.75-6.el7                                                 base                                            32 ksetools-libs                                            x86_64                               3.3.8-4.el7                                                base                                           620 kslirp4netns                                             x86_64                               0.4.3-4.el7_8                                              extras                                          81 kTransaction Summary
==============================================================================================================================================================================================================
Install  1 Package (+16 Dependent packages)Total download size: 106 M
Installed size: 378 M
Is this ok [y/d/N]: y
Downloading packages:
(1/17): checkpolicy-2.5-8.el7.x86_64.rpm                                                                                                                                               | 295 kB  00:00:00
(2/17): container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm                                                                                                                           |  40 kB  00:00:00
(3/17): audit-libs-python-2.8.5-4.el7.x86_64.rpm                                                                                                                                       |  76 kB  00:00:00
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-buildx-plugin-0.10.5-1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY             ] 4.9 MB/s |  15 MB  00:00:18 ETA
Public key for docker-buildx-plugin-0.10.5-1.el7.x86_64.rpm is not installed
(4/17): docker-buildx-plugin-0.10.5-1.el7.x86_64.rpm                                                                                                                                   |  12 MB  00:00:01
(5/17): containerd.io-1.6.21-3.1.el7.x86_64.rpm                                                                                                                                        |  34 MB  00:00:02
(6/17): docker-ce-cli-24.0.2-1.el7.x86_64.rpm                                                                                                                                          |  13 MB  00:00:00
(7/17): docker-ce-24.0.2-1.el7.x86_64.rpm                                                                                                                                              |  24 MB  00:00:01
(8/17): docker-ce-rootless-extras-24.0.2-1.el7.x86_64.rpm                                                                                                                              | 9.1 MB  00:00:00
(9/17): fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm                                                                                                                                        |  54 kB  00:00:00
(10/17): fuse3-libs-3.6.1-4.el7.x86_64.rpm                                                                                                                                             |  82 kB  00:00:00
(11/17): policycoreutils-python-2.5-34.el7.x86_64.rpm                                                                                                                                  | 457 kB  00:00:00
(12/17): libcgroup-0.41-21.el7.x86_64.rpm                                                                                                                                              |  66 kB  00:00:00
(13/17): python-IPy-0.75-6.el7.noarch.rpm                                                                                                                                              |  32 kB  00:00:00
(14/17): docker-compose-plugin-2.18.1-1.el7.x86_64.rpm                                                                                                                                 |  12 MB  00:00:00
(15/17): libsemanage-python-2.5-14.el7.x86_64.rpm                                                                                                                                      | 113 kB  00:00:00
(16/17): setools-libs-3.3.8-4.el7.x86_64.rpm                                                                                                                                           | 620 kB  00:00:00
(17/17): slirp4netns-0.4.3-4.el7_8.x86_64.rpm                                                                                                                                          |  81 kB  00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                          27 MB/s | 106 MB  00:00:03
Retrieving key from https://download.docker.com/linux/centos/gpg
Importing GPG key 0x621E9F35:Userid     : "Docker Release (CE rpm) <docker@docker.com>"Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35From       : https://download.docker.com/linux/centos/gpg
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : libcgroup-0.41-21.el7.x86_64                                                                                                                                                              1/17Installing : docker-buildx-plugin-0.10.5-1.el7.x86_64                                                                                                                                                  2/17Installing : setools-libs-3.3.8-4.el7.x86_64                                                                                                                                                           3/17Installing : audit-libs-python-2.8.5-4.el7.x86_64                                                                                                                                                      4/17Installing : checkpolicy-2.5-8.el7.x86_64                                                                                                                                                              5/17Installing : python-IPy-0.75-6.el7.noarch                                                                                                                                                              6/17Installing : slirp4netns-0.4.3-4.el7_8.x86_64                                                                                                                                                          7/17Installing : libsemanage-python-2.5-14.el7.x86_64                                                                                                                                                      8/17Installing : policycoreutils-python-2.5-34.el7.x86_64                                                                                                                                                  9/17Installing : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch                                                                                                                                       10/17Installing : containerd.io-1.6.21-3.1.el7.x86_64                                                                                                                                                      11/17Installing : fuse3-libs-3.6.1-4.el7.x86_64                                                                                                                                                            12/17Installing : fuse-overlayfs-0.7.2-6.el7_8.x86_64                                                                                                                                                      13/17Installing : docker-compose-plugin-2.18.1-1.el7.x86_64                                                                                                                                                14/17Installing : 1:docker-ce-cli-24.0.2-1.el7.x86_64                                                                                                                                                      15/17Installing : docker-ce-rootless-extras-24.0.2-1.el7.x86_64                                                                                                                                            16/17Installing : 3:docker-ce-24.0.2-1.el7.x86_64                                                                                                                                                          17/17Verifying  : 3:docker-ce-24.0.2-1.el7.x86_64                                                                                                                                                           1/17Verifying  : docker-compose-plugin-2.18.1-1.el7.x86_64                                                                                                                                                 2/17Verifying  : fuse3-libs-3.6.1-4.el7.x86_64                                                                                                                                                             3/17Verifying  : fuse-overlayfs-0.7.2-6.el7_8.x86_64                                                                                                                                                       4/17Verifying  : libsemanage-python-2.5-14.el7.x86_64                                                                                                                                                      5/17Verifying  : containerd.io-1.6.21-3.1.el7.x86_64                                                                                                                                                       6/17Verifying  : slirp4netns-0.4.3-4.el7_8.x86_64                                                                                                                                                          7/17Verifying  : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch                                                                                                                                        8/17Verifying  : python-IPy-0.75-6.el7.noarch                                                                                                                                                              9/17Verifying  : 1:docker-ce-cli-24.0.2-1.el7.x86_64                                                                                                                                                      10/17Verifying  : checkpolicy-2.5-8.el7.x86_64                                                                                                                                                             11/17Verifying  : policycoreutils-python-2.5-34.el7.x86_64                                                                                                                                                 12/17Verifying  : audit-libs-python-2.8.5-4.el7.x86_64                                                                                                                                                     13/17Verifying  : setools-libs-3.3.8-4.el7.x86_64                                                                                                                                                          14/17Verifying  : docker-ce-rootless-extras-24.0.2-1.el7.x86_64                                                                                                                                            15/17Verifying  : docker-buildx-plugin-0.10.5-1.el7.x86_64                                                                                                                                                 16/17Verifying  : libcgroup-0.41-21.el7.x86_64                                                                                                                                                             17/17Installed:docker-ce.x86_64 3:24.0.2-1.el7Dependency Installed:audit-libs-python.x86_64 0:2.8.5-4.el7            checkpolicy.x86_64 0:2.5-8.el7             container-selinux.noarch 2:2.119.2-1.911c772.el7_8        containerd.io.x86_64 0:1.6.21-3.1.el7docker-buildx-plugin.x86_64 0:0.10.5-1.el7        docker-ce-cli.x86_64 1:24.0.2-1.el7        docker-ce-rootless-extras.x86_64 0:24.0.2-1.el7           docker-compose-plugin.x86_64 0:2.18.1-1.el7fuse-overlayfs.x86_64 0:0.7.2-6.el7_8             fuse3-libs.x86_64 0:3.6.1-4.el7            libcgroup.x86_64 0:0.41-21.el7                            libsemanage-python.x86_64 0:2.5-14.el7policycoreutils-python.x86_64 0:2.5-34.el7        python-IPy.noarch 0:0.75-6.el7             setools-libs.x86_64 0:3.3.8-4.el7                         slirp4netns.x86_64 0:0.4.3-4.el7_8Complete!
  1. 设置docker开机启动
    systemctl enable docker
[root@master01-k ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
  1. 启动docker
    systemctl start docker
[root@master01-k ~]# systemctl start docker
[root@master01-k ~]#
  1. 测试可用
    docker run hello-world
[root@master01-k ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
719385e32844: Pull complete
Digest: sha256:fc6cf906cbfa013e80938cdf0bb199fbdbb86d6e3e013783e5a766f50f5dbce0
Status: Downloaded newer image for hello-world:latestHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/

跑起来了吧。
完。


https://dhexx.cn/news/show-4633672.html

相关文章

华为OD机试真题 Java 实现【高矮个子排队】【2023Q2 100分】,附详细解题思路

一、题目描述 现在有一队小朋友&#xff0c;他们高矮不同&#xff0c;我们以正整数数组表示这一队小朋友的身高&#xff0c;如数组{5,3,1,2,3}。 我们现在希望小朋友排队&#xff0c;以“高”“矮”“高”“矮”顺序排列&#xff0c;每一个“高”位置的小朋友要比相邻的位置高…

在滴滴和字节干了4年测试开发,简直不要太真实…

先简单交代一下&#xff0c;某不知名211的本硕&#xff0c;18年毕业加入滴滴&#xff0c;之后跳槽到了头条&#xff0c;一直从事测试开发相关的工作。之前没有实习经历&#xff0c;算是四年的工作经验吧。 这四年之间完成了一次晋升&#xff0c;换了一家公司&#xff0c;有过开…

马尔可夫链蒙特卡罗算法(MCMC方法)

MCMC方法是什么 具体而言&#xff0c;假设我们要计算积分 μ ∫ S h ( θ ) π ( θ ∣ x ) d θ \mu\int_Sh(\theta)\pi(\theta|x)d\theta μ∫S​h(θ)π(θ∣x)dθ如果后验分布 π ( θ ∣ x ) \pi(\theta|x) π(θ∣x)难以直接抽样&#xff0c;那么我们就可以构造一条马氏…

腾讯工作3个月,做测试的一些感悟...

普通二本计算机专业毕业&#xff0c;从毕业后&#xff0c;第一份接触测试的工作是在一家通讯小公司&#xff0c;大部分接触的工作是以功能测试为主&#xff0c;一直都是几千块钱工资&#xff0c;还一度被派出差&#xff0c;以及兼职各种产品、运维、运营的活&#xff0c;感觉自…

Redi事务,数据持久化

4.其他数据功能 4.1pubsub发布订阅 Redis 发布订阅(pub/sub)是一种消息通信模式&#xff1a;发送者(pub)发送消息&#xff0c;订阅者(sub)接收消息。 Redis 客户端可以订阅任意数量的频道。 下面示例展示了频道 channel1 &#xff0c; 以及订阅这个频道的三个客户端 —— c…

彩票中奖率的真相:用 JavaScript 看透彩票背后的随机算法

原本这篇文章是打算叫「假如我是彩票系统开发者」&#xff0c;但细想一下&#xff0c;如果在文章中引用太多的 JavaScript 的话&#xff0c;反而不是那么纯粹&#xff0c;毕竟也只是我的一厢情愿&#xff0c;彩票开发也不全如本文所讲&#xff0c;有所误导的话便也是得不偿失了…

GS2972(3G-SDI)视频输出驱动调试

GS2972视频输出调试 GS2972的硬件初始化GS2972的驱动时序GS2972的驱动RTL代码GS2972输出彩条GS2972驱动易出bug GS2972的硬件初始化 GS2972是HD-SDI/3G-SDI视频、音频串化器。其使用非常简单&#xff0c;但是要想把该芯片驱动起来&#xff0c;真心不容易。需要了解相关视频标准…

一篇文章搞懂CMake(gcc、g++、cmake解释)

一篇文章搞懂CMake &#xff08;gcc、g、cmake解释&#xff09; 这里写目录标题 一篇文章搞懂CMake &#xff08;gcc、g、cmake解释&#xff09;gccgcmake1. CMake 流程如何使用cmake&#xff1f;简单的CMake.txt文件 参考 gcc gcc命令来自英文词组“GNU Compiler Collection”…

1.7 基于XML配置方式使用Spring MVC

一、基于XML配置与注解的方式使用Spring MVC 1、创建Maven项目 Maven项目 - SpringMvcDemo01 单击【Finish】按钮 2、添加相关依赖 在pom.xml文件里添加支持Spring MVC的相关依赖 <?xml version"1.0" encoding"UTF-8"?> <project xmln…

python之函数(参数,匿名函数,局部变量和全局变量)

文章目录 前言一、函数的参数 1、形参和实参2、必传参数&#xff08;也叫&#xff1a;必须参数&#xff09;3、关键字传参4.、默认参数5、不定长参数6、传参的顺序二、匿名函数&#xff08;lambda函数&#xff09; 1. 定义及特点语法格式2. lambda函数的特点三、函数返回值retu…