2022年11月2日 星期三

[研究] Docker 20.10.21 自動化應用程式部署工具 安裝 (Rocky Linux 9.0)

[研究] Docker 4.1.1 自動化應用程式部署工具 安裝 (Rocky Linux 9.0)

2022-11-02

網站
https://wiki.centos.org/zh-tw/Cloud/Docker

參考

Add the docker repository

Use the dnf utility to add the docker repository to your Rocky Linux server. Type:

sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Install the needed packages

Install the latest version of Docker Engine, containerd, and Docker Compose, by running:

sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin

Start and enable the systemd docker service (dockerd)
Use the systemctl utility to configure the dockerd daemon to automatically startup with the next system reboot and simultaneously start it for the current session. Type:

sudo systemctl --now enable docker

Notes

docker-ce               : This package provides the underlying technology for building and running docker containers (dockerd) 
docker-ce-cli           : Provides the command line interface (CLI) client docker tool (docker)
containerd.io           : Provides the container runtime (runc)
docker-compose-plugin   : A plugin that provides the 'docker compose' subcommand 

Docker 是一個開源的引擎,透過輕量級、便攜、自給自足、能執行於任何環境的容器,自動化應用程式的部署。

安裝
 
[user1@localhost ~]$ sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for user1: 
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
[user1@localhost ~]$ 


[user1@localhost ~]$ sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Rocky Linux 9 - BaseOS                                                                                      433 kB/s | 1.7 MB     00:03    
Rocky Linux 9 - AppStream                                                                                   193 kB/s | 6.0 MB     00:31    
Rocky Linux 9 - Extras                                                                                      5.2 kB/s | 6.6 kB     00:01    
Error: 
 Problem: problem with installed package buildah-1:1.24.2-4.el9_0.x86_64
  - package buildah-1:1.24.2-4.el9_0.x86_64 requires runc >= 1.0.0-26, but none of the providers can be installed
  - package buildah-1:1.26.2-1.el9_0.x86_64 requires runc >= 1.0.0-26, but none of the providers can be installed
  - package containerd.io-1.6.9-3.1.el9.x86_64 conflicts with runc provided by runc-3:1.1.0-2.el9.x86_64
  - package containerd.io-1.6.9-3.1.el9.x86_64 obsoletes runc provided by runc-3:1.1.0-2.el9.x86_64
  - package containerd.io-1.6.9-3.1.el9.x86_64 conflicts with runc provided by runc-4:1.1.3-2.el9_0.x86_64
  - package containerd.io-1.6.9-3.1.el9.x86_64 obsoletes runc provided by runc-4:1.1.3-2.el9_0.x86_64
  - cannot install the best candidate for the job
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[user1@localhost ~]$ 


方法(一):加上 --allowerasing 參數執行

[user1@localhost ~]$ sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin --allowerasing
Docker CE Stable - x86_64                                                                                    36 kB/s |  12 kB     00:00    
Rocky Linux 9 - BaseOS                                                                                      913 kB/s | 1.7 MB     00:01    
Rocky Linux 9 - AppStream                                                                                   1.6 MB/s | 6.0 MB     00:03    
Rocky Linux 9 - Extras                                                                                      3.1 kB/s | 6.6 kB     00:02    
Dependencies resolved.
============================================================================================================================================
 Package                                   Architecture           Version                            Repository                        Size
============================================================================================================================================
Installing:
 containerd.io                             x86_64                 1.6.9-3.1.el9                      docker-ce-stable                  32 M
     replacing  runc.x86_64 3:1.1.0-2.el9
 docker-ce                                 x86_64                 3:20.10.21-3.el9                   docker-ce-stable                  21 M
 docker-ce-cli                             x86_64                 1:20.10.21-3.el9                   docker-ce-stable                  29 M
 docker-compose-plugin                     x86_64                 2.12.2-3.el9                       docker-ce-stable                  10 M
Upgrading:
 podman                                    x86_64                 2:4.1.1-1.el9_0                    appstream                         12 M
 podman-catatonit                          x86_64                 2:4.1.1-1.el9_0                    appstream                        350 k
Installing dependencies:
 docker-ce-rootless-extras                 x86_64                 20.10.21-3.el9                     docker-ce-stable                 3.7 M
Installing weak dependencies:
 docker-scan-plugin                        x86_64                 0.21.0-3.el9                       docker-ce-stable                 3.8 M
Removing dependent packages:
 buildah                                   x86_64                 1:1.24.2-4.el9_0                   @AppStream                        30 M

Transaction Summary
============================================================================================================================================
Install  6 Packages
Upgrade  2 Packages
Remove   1 Package

Total download size: 112 M
Downloading Packages:
(1/8): docker-ce-20.10.21-3.el9.x86_64.rpm                                                                  2.2 MB/s |  21 MB     00:09    
(2/8): docker-ce-rootless-extras-20.10.21-3.el9.x86_64.rpm                                                  2.3 MB/s | 3.7 MB     00:01    
(3/8): docker-ce-cli-20.10.21-3.el9.x86_64.rpm                                                              2.5 MB/s |  29 MB     00:11    
(4/8): containerd.io-1.6.9-3.1.el9.x86_64.rpm                                                               2.5 MB/s |  32 MB     00:12    
(5/8): docker-scan-plugin-0.21.0-3.el9.x86_64.rpm                                                           2.6 MB/s | 3.8 MB     00:01    
(6/8): podman-catatonit-4.1.1-1.el9_0.x86_64.rpm                                                            330 kB/s | 350 kB     00:01    
(7/8): docker-compose-plugin-2.12.2-3.el9.x86_64.rpm                                                        2.8 MB/s |  10 MB     00:03    
(8/8): podman-4.1.1-1.el9_0.x86_64.rpm                                                                      892 kB/s |  12 MB     00:13    
--------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                       4.0 MB/s | 112 MB     00:27     
Docker CE Stable - x86_64                                                                                    21 kB/s | 1.6 kB     00:00    
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
Key imported successfully
Rocky Linux 9 - AppStream                                                                                   1.7 MB/s | 1.7 kB     00:00    
Importing GPG key 0x350D275D:
 Userid     : "Rocky Enterprise Software Foundation - Release key 2022 <releng@rockylinux.org>"
 Fingerprint: 21CB 256A E16F C54C 6E65 2949 702D 426D 350D 275D
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                    1/1 
  Installing       : docker-scan-plugin-0.21.0-3.el9.x86_64                                                                            1/12 
  Running scriptlet: docker-scan-plugin-0.21.0-3.el9.x86_64                                                                            1/12 
  Installing       : docker-ce-cli-1:20.10.21-3.el9.x86_64                                                                             2/12 
  Running scriptlet: docker-ce-cli-1:20.10.21-3.el9.x86_64                                                                             2/12 
  Upgrading        : podman-2:4.1.1-1.el9_0.x86_64                                                                                     3/12 
  Upgrading        : podman-catatonit-2:4.1.1-1.el9_0.x86_64                                                                           4/12 
  Installing       : containerd.io-1.6.9-3.1.el9.x86_64                                                                                5/12 
  Running scriptlet: containerd.io-1.6.9-3.1.el9.x86_64                                                                                5/12 
  Installing       : docker-ce-rootless-extras-20.10.21-3.el9.x86_64                                                                   6/12 
  Running scriptlet: docker-ce-rootless-extras-20.10.21-3.el9.x86_64                                                                   6/12 
  Installing       : docker-ce-3:20.10.21-3.el9.x86_64                                                                                 7/12 
  Running scriptlet: docker-ce-3:20.10.21-3.el9.x86_64                                                                                 7/12 
  Installing       : docker-compose-plugin-2.12.2-3.el9.x86_64                                                                         8/12 
  Running scriptlet: docker-compose-plugin-2.12.2-3.el9.x86_64                                                                         8/12 
  Cleanup          : podman-catatonit-2:4.0.2-7.el9_0.x86_64                                                                           9/12 
  Cleanup          : podman-2:4.0.2-7.el9_0.x86_64                                                                                    10/12 
  Erasing          : buildah-1:1.24.2-4.el9_0.x86_64                                                                                  11/12 
  Obsoleting       : runc-3:1.1.0-2.el9.x86_64                                                                                        12/12 
  Running scriptlet: runc-3:1.1.0-2.el9.x86_64                                                                                        12/12 
  Verifying        : containerd.io-1.6.9-3.1.el9.x86_64                                                                                1/12 
  Verifying        : runc-3:1.1.0-2.el9.x86_64                                                                                         2/12 
  Verifying        : docker-ce-3:20.10.21-3.el9.x86_64                                                                                 3/12 
  Verifying        : docker-ce-cli-1:20.10.21-3.el9.x86_64                                                                             4/12 
  Verifying        : docker-ce-rootless-extras-20.10.21-3.el9.x86_64                                                                   5/12 
  Verifying        : docker-compose-plugin-2.12.2-3.el9.x86_64                                                                         6/12 
  Verifying        : docker-scan-plugin-0.21.0-3.el9.x86_64                                                                            7/12 
  Verifying        : podman-catatonit-2:4.1.1-1.el9_0.x86_64                                                                           8/12 
  Verifying        : podman-catatonit-2:4.0.2-7.el9_0.x86_64                                                                           9/12 
  Verifying        : podman-2:4.1.1-1.el9_0.x86_64                                                                                    10/12 
  Verifying        : podman-2:4.0.2-7.el9_0.x86_64                                                                                    11/12 
  Verifying        : buildah-1:1.24.2-4.el9_0.x86_64                                                                                  12/12 

Upgraded:
  podman-2:4.1.1-1.el9_0.x86_64                                   podman-catatonit-2:4.1.1-1.el9_0.x86_64                                  
Installed:
  containerd.io-1.6.9-3.1.el9.x86_64                 docker-ce-3:20.10.21-3.el9.x86_64            docker-ce-cli-1:20.10.21-3.el9.x86_64    
  docker-ce-rootless-extras-20.10.21-3.el9.x86_64    docker-compose-plugin-2.12.2-3.el9.x86_64    docker-scan-plugin-0.21.0-3.el9.x86_64   
Removed:
  buildah-1:1.24.2-4.el9_0.x86_64                                                                                                           

Complete!
[user1@localhost ~]$

方法(二):移除衝突的套件,再次安裝 

[user1@localhost ~]$ sudo dnf remove podman buildah -y
Dependencies resolved.
============================================================================================================================================
 Package                              Architecture             Version                                   Repository                    Size
============================================================================================================================================
Removing:
 buildah                              x86_64                   1:1.24.2-4.el9_0                          @AppStream                    30 M
 podman                               x86_64                   2:4.1.1-1.el9_0                           @appstream                    45 M
Removing dependent packages:
 cockpit-podman                       noarch                   43-1.el9_0                                @AppStream                   493 k
 podman-docker                        noarch                   2:4.1.1-1.el9_0                           @appstream                   234  
Removing unused dependencies:
 aardvark-dns                         x86_64                   2:1.0.1-34.el9_0                          @AppStream                   3.6 M
 conmon                               x86_64                   2:2.1.0-1.el9                             @AppStream                   171 k
 container-selinux                    noarch                   3:2.179.1-1.el9_0.0.1                     @AppStream                    55 k
 containers-common                    x86_64                   2:1-34.el9_0                              @AppStream                   361 k
 criu                                 x86_64                   3.15-13.el9                               @AppStream                   1.4 M
 criu-libs                            x86_64                   3.15-13.el9                               @AppStream                    81 k
 crun                                 x86_64                   1.4.4-2.el9_0                             @AppStream                   421 k
 fuse-overlayfs                       x86_64                   1.8.2-1.el9                               @AppStream                   148 k
 libnet                               x86_64                   1.2-6.el9                                 @AppStream                   128 k
 libslirp                             x86_64                   4.4.0-7.el9                               @AppStream                   133 k
 netavark                             x86_64                   2:1.0.1-34.el9_0                          @AppStream                   8.1 M
 podman-catatonit                     x86_64                   2:4.1.1-1.el9_0                           @appstream                   835 k
 runc                                 x86_64                   3:1.1.0-2.el9                             @AppStream                    11 M
 shadow-utils-subid                   x86_64                   2:4.9-3.el9                               @anaconda                    217 k
 slirp4netns                          x86_64                   1.1.12-4.el9                              @AppStream                    84 k
 yajl                                 x86_64                   2.1.0-20.el9                              @AppStream                    91 k

Transaction Summary
============================================================================================================================================
Remove  20 Packages

Freed space: 102 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                    1/1 
  Erasing          : buildah-1:1.24.2-4.el9_0.x86_64                                                                                   1/20 
  Erasing          : podman-docker-2:4.1.1-1.el9_0.noarch                                                                              2/20 
  Erasing          : cockpit-podman-43-1.el9_0.noarch                                                                                  3/20 
  Erasing          : podman-2:4.1.1-1.el9_0.x86_64                                                                                     4/20 
  Erasing          : containers-common-2:1-34.el9_0.x86_64                                                                             5/20 
  Erasing          : slirp4netns-1.1.12-4.el9.x86_64                                                                                   6/20 
  Erasing          : crun-1.4.4-2.el9_0.x86_64                                                                                         7/20 
  Erasing          : criu-libs-3.15-13.el9.x86_64                                                                                      8/20 
  Erasing          : netavark-2:1.0.1-34.el9_0.x86_64                                                                                  9/20 
  Erasing          : runc-3:1.1.0-2.el9.x86_64                                                                                        10/20 
  Erasing          : container-selinux-3:2.179.1-1.el9_0.0.1.noarch                                                                   11/20 
  Running scriptlet: container-selinux-3:2.179.1-1.el9_0.0.1.noarch                                                                   11/20 
  Erasing          : podman-catatonit-2:4.1.1-1.el9_0.x86_64                                                                          12/20 
  Erasing          : criu-3.15-13.el9.x86_64                                                                                          13/20 
  Erasing          : libnet-1.2-6.el9.x86_64                                                                                          14/20 
  Erasing          : aardvark-dns-2:1.0.1-34.el9_0.x86_64                                                                             15/20 
  Erasing          : yajl-2.1.0-20.el9.x86_64                                                                                         16/20 
  Erasing          : libslirp-4.4.0-7.el9.x86_64                                                                                      17/20 
  Erasing          : fuse-overlayfs-1.8.2-1.el9.x86_64                                                                                18/20 
  Erasing          : conmon-2:2.1.0-1.el9.x86_64                                                                                      19/20 
  Erasing          : shadow-utils-subid-2:4.9-3.el9.x86_64                                                                            20/20 
  Running scriptlet: shadow-utils-subid-2:4.9-3.el9.x86_64                                                                            20/20 
  Verifying        : aardvark-dns-2:1.0.1-34.el9_0.x86_64                                                                              1/20 
  Verifying        : buildah-1:1.24.2-4.el9_0.x86_64                                                                                   2/20 
  Verifying        : cockpit-podman-43-1.el9_0.noarch                                                                                  3/20 
  Verifying        : conmon-2:2.1.0-1.el9.x86_64                                                                                       4/20 
  Verifying        : container-selinux-3:2.179.1-1.el9_0.0.1.noarch                                                                    5/20 
  Verifying        : containers-common-2:1-34.el9_0.x86_64                                                                             6/20 
  Verifying        : criu-3.15-13.el9.x86_64                                                                                           7/20 
  Verifying        : criu-libs-3.15-13.el9.x86_64                                                                                      8/20 
  Verifying        : crun-1.4.4-2.el9_0.x86_64                                                                                         9/20 
  Verifying        : fuse-overlayfs-1.8.2-1.el9.x86_64                                                                                10/20 
  Verifying        : libnet-1.2-6.el9.x86_64                                                                                          11/20 
  Verifying        : libslirp-4.4.0-7.el9.x86_64                                                                                      12/20 
  Verifying        : netavark-2:1.0.1-34.el9_0.x86_64                                                                                 13/20 
  Verifying        : podman-2:4.1.1-1.el9_0.x86_64                                                                                    14/20 
  Verifying        : podman-catatonit-2:4.1.1-1.el9_0.x86_64                                                                          15/20 
  Verifying        : podman-docker-2:4.1.1-1.el9_0.noarch                                                                             16/20 
  Verifying        : runc-3:1.1.0-2.el9.x86_64                                                                                        17/20 
  Verifying        : shadow-utils-subid-2:4.9-3.el9.x86_64                                                                            18/20 
  Verifying        : slirp4netns-1.1.12-4.el9.x86_64                                                                                  19/20 
  Verifying        : yajl-2.1.0-20.el9.x86_64                                                                                         20/20 

Removed:
  aardvark-dns-2:1.0.1-34.el9_0.x86_64      buildah-1:1.24.2-4.el9_0.x86_64                     cockpit-podman-43-1.el9_0.noarch            
  conmon-2:2.1.0-1.el9.x86_64               container-selinux-3:2.179.1-1.el9_0.0.1.noarch      containers-common-2:1-34.el9_0.x86_64       
  criu-3.15-13.el9.x86_64                   criu-libs-3.15-13.el9.x86_64                        crun-1.4.4-2.el9_0.x86_64                   
  fuse-overlayfs-1.8.2-1.el9.x86_64         libnet-1.2-6.el9.x86_64                             libslirp-4.4.0-7.el9.x86_64                 
  netavark-2:1.0.1-34.el9_0.x86_64          podman-2:4.1.1-1.el9_0.x86_64                       podman-catatonit-2:4.1.1-1.el9_0.x86_64     
  podman-docker-2:4.1.1-1.el9_0.noarch      runc-3:1.1.0-2.el9.x86_64                           shadow-utils-subid-2:4.9-3.el9.x86_64       
  slirp4netns-1.1.12-4.el9.x86_64           yajl-2.1.0-20.el9.x86_64                           

Complete!
[user1@localhost ~]$

再次安裝

[user1@localhost ~]$ sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Last metadata expiration check: 0:03:08 ago on Wed 02 Nov 2022 10:01:06 AM CST.
Dependencies resolved.
============================================================================================================================================
 Package                                   Architecture           Version                            Repository                        Size
============================================================================================================================================
Installing:
 containerd.io                             x86_64                 1.6.9-3.1.el9                      docker-ce-stable                  32 M
 docker-ce                                 x86_64                 3:20.10.21-3.el9                   docker-ce-stable                  21 M
 docker-ce-cli                             x86_64                 1:20.10.21-3.el9                   docker-ce-stable                  29 M
 docker-compose-plugin                     x86_64                 2.12.2-3.el9                       docker-ce-stable                  10 M
Installing dependencies:
 container-selinux                         noarch                 3:2.188.0-1.el9_0                  appstream                         47 k
 docker-ce-rootless-extras                 x86_64                 20.10.21-3.el9                     docker-ce-stable                 3.7 M
 fuse-overlayfs                            x86_64                 1.9-1.el9_0                        appstream                         71 k
 libslirp                                  x86_64                 4.4.0-7.el9                        appstream                         68 k
 slirp4netns                               x86_64                 1.2.0-2.el9_0                      appstream                         46 k
Installing weak dependencies:
 docker-scan-plugin                        x86_64                 0.21.0-3.el9                       docker-ce-stable                 3.8 M

Transaction Summary
============================================================================================================================================
Install  10 Packages

Total download size: 99 M
Installed size: 394 M
Downloading Packages:
(1/10): docker-ce-20.10.21-3.el9.x86_64.rpm                                                                 1.6 MB/s |  21 MB     00:13    
(2/10): docker-ce-rootless-extras-20.10.21-3.el9.x86_64.rpm                                                 1.3 MB/s | 3.7 MB     00:02    
(3/10): containerd.io-1.6.9-3.1.el9.x86_64.rpm                                                              1.9 MB/s |  32 MB     00:16    
(4/10): docker-ce-cli-20.10.21-3.el9.x86_64.rpm                                                             1.7 MB/s |  29 MB     00:16    
(5/10): docker-scan-plugin-0.21.0-3.el9.x86_64.rpm                                                          3.4 MB/s | 3.8 MB     00:01    
(6/10): docker-compose-plugin-2.12.2-3.el9.x86_64.rpm                                                       4.6 MB/s |  10 MB     00:02    
(7/10): container-selinux-2.188.0-1.el9_0.noarch.rpm                                                         21 kB/s |  47 kB     00:02    
(8/10): slirp4netns-1.2.0-2.el9_0.x86_64.rpm                                                                 40 kB/s |  46 kB     00:01    
(9/10): libslirp-4.4.0-7.el9.x86_64.rpm                                                                      96 kB/s |  68 kB     00:00    
(10/10): fuse-overlayfs-1.9-1.el9_0.x86_64.rpm                                                               30 kB/s |  71 kB     00:02    
--------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                       4.7 MB/s |  99 MB     00:21     
Docker CE Stable - x86_64                                                                                    10 kB/s | 1.6 kB     00:00    
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
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                    1/1 
  Running scriptlet: container-selinux-3:2.188.0-1.el9_0.noarch                                                                        1/10 
  Installing       : container-selinux-3:2.188.0-1.el9_0.noarch                                                                        1/10 
  Running scriptlet: container-selinux-3:2.188.0-1.el9_0.noarch                                                                        1/10 
  Installing       : docker-scan-plugin-0.21.0-3.el9.x86_64                                                                            2/10 
  Running scriptlet: docker-scan-plugin-0.21.0-3.el9.x86_64                                                                            2/10 
  Installing       : docker-ce-cli-1:20.10.21-3.el9.x86_64                                                                             3/10 
  Running scriptlet: docker-ce-cli-1:20.10.21-3.el9.x86_64                                                                             3/10 
  Installing       : containerd.io-1.6.9-3.1.el9.x86_64                                                                                4/10 
  Running scriptlet: containerd.io-1.6.9-3.1.el9.x86_64                                                                                4/10 
  Installing       : libslirp-4.4.0-7.el9.x86_64                                                                                       5/10 
  Installing       : slirp4netns-1.2.0-2.el9_0.x86_64                                                                                  6/10 
  Installing       : fuse-overlayfs-1.9-1.el9_0.x86_64                                                                                 7/10 
  Running scriptlet: fuse-overlayfs-1.9-1.el9_0.x86_64                                                                                 7/10 
  Installing       : docker-ce-rootless-extras-20.10.21-3.el9.x86_64                                                                   8/10 
  Running scriptlet: docker-ce-rootless-extras-20.10.21-3.el9.x86_64                                                                   8/10 
  Installing       : docker-ce-3:20.10.21-3.el9.x86_64                                                                                 9/10 
  Running scriptlet: docker-ce-3:20.10.21-3.el9.x86_64                                                                                 9/10 
  Installing       : docker-compose-plugin-2.12.2-3.el9.x86_64                                                                        10/10 
  Running scriptlet: docker-compose-plugin-2.12.2-3.el9.x86_64                                                                        10/10 
  Running scriptlet: container-selinux-3:2.188.0-1.el9_0.noarch                                                                       10/10 
  Running scriptlet: docker-compose-plugin-2.12.2-3.el9.x86_64                                                                        10/10 
  Verifying        : containerd.io-1.6.9-3.1.el9.x86_64                                                                                1/10 
  Verifying        : docker-ce-3:20.10.21-3.el9.x86_64                                                                                 2/10 
  Verifying        : docker-ce-cli-1:20.10.21-3.el9.x86_64                                                                             3/10 
  Verifying        : docker-ce-rootless-extras-20.10.21-3.el9.x86_64                                                                   4/10 
  Verifying        : docker-compose-plugin-2.12.2-3.el9.x86_64                                                                         5/10 
  Verifying        : docker-scan-plugin-0.21.0-3.el9.x86_64                                                                            6/10 
  Verifying        : container-selinux-3:2.188.0-1.el9_0.noarch                                                                        7/10 
  Verifying        : fuse-overlayfs-1.9-1.el9_0.x86_64                                                                                 8/10 
  Verifying        : slirp4netns-1.2.0-2.el9_0.x86_64                                                                                  9/10 
  Verifying        : libslirp-4.4.0-7.el9.x86_64                                                                                      10/10 

Installed:
  container-selinux-3:2.188.0-1.el9_0.noarch   containerd.io-1.6.9-3.1.el9.x86_64                docker-ce-3:20.10.21-3.el9.x86_64          
  docker-ce-cli-1:20.10.21-3.el9.x86_64        docker-ce-rootless-extras-20.10.21-3.el9.x86_64   docker-compose-plugin-2.12.2-3.el9.x86_64  
  docker-scan-plugin-0.21.0-3.el9.x86_64       fuse-overlayfs-1.9-1.el9_0.x86_64                 libslirp-4.4.0-7.el9.x86_64                
  slirp4netns-1.2.0-2.el9_0.x86_64            

Complete!
[user1@localhost ~]$ 

設定開機立刻啟動 

[user1@localhost ~]$ sudo systemctl --now enable docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
[user1@localhost ~]$

檢查 

[user1@localhost ~]$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2022-11-02 10:07:22 CST; 9s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 34723 (dockerd)
      Tasks: 9
     Memory: 27.4M
        CPU: 211ms
     CGroup: /system.slice/docker.service
             └─34723 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Nov 02 10:07:21 localhost.localdomain dockerd[34723]: time="2022-11-02T10:07:21.530097006+08:00" level=info msg="ClientConn switching balan>
Nov 02 10:07:21 localhost.localdomain dockerd[34723]: time="2022-11-02T10:07:21.531011360+08:00" level=error msg="Failed to built-in GetDri>
Nov 02 10:07:21 localhost.localdomain dockerd[34723]: time="2022-11-02T10:07:21.555701695+08:00" level=info msg="Loading containers: start."
Nov 02 10:07:22 localhost.localdomain dockerd[34723]: time="2022-11-02T10:07:22.048173865+08:00" level=info msg="Default bridge (docker0) i>
Nov 02 10:07:22 localhost.localdomain dockerd[34723]: time="2022-11-02T10:07:22.149798662+08:00" level=info msg="Firewalld: interface docke>
Nov 02 10:07:22 localhost.localdomain dockerd[34723]: time="2022-11-02T10:07:22.254614063+08:00" level=info msg="Loading containers: done."
Nov 02 10:07:22 localhost.localdomain dockerd[34723]: time="2022-11-02T10:07:22.292069852+08:00" level=info msg="Docker daemon" commit=3056>
Nov 02 10:07:22 localhost.localdomain dockerd[34723]: time="2022-11-02T10:07:22.292189863+08:00" level=info msg="Daemon has completed initi>
Nov 02 10:07:22 localhost.localdomain systemd[1]: Started Docker Application Container Engine.
Nov 02 10:07:22 localhost.localdomain dockerd[34723]: time="2022-11-02T10:07:22.360399358+08:00" level=info msg="API listen on /run/docker.>
[user1@localhost ~]$ 
ㄐ檢

檢查

[user1@localhost ~]$ ps aux | grep docker
root        2940  0.0  0.0 225748   840 ?        Ssl  09:59   0:00 gpg-agent --homedir /var/cache/PackageKit/9.0/metadata/docker-ce-stable-9-x86_64.tmp/gpgdir --use-standard-socket --daemon
root        2942  0.0  0.0  78600  1332 ?        SLl  09:59   0:00 scdaemon --multi-server --homedir /var/cache/PackageKit/9.0/metadata/docker-ce-stable-9-x86_64.tmp/gpgdir
root       34723  0.1  1.8 1379444 71848 ?       Ssl  10:07   0:00 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
user1      34896  0.0  0.0 221668  2264 pts/0    S+   10:08   0:00 grep --color=auto docker
[user1@localhost ~]$ 

檢查

[user1@localhost ~]$ docker -v
Docker version 20.10.21, build baeda1f  
[user1@localhost ~]$

(完)

相關

[研究] Docker 20.10.21 自動化應用程式部署工具 安裝 (Rocky Linux 9.0)
https://shaurong.blogspot.com/2022/11/docker-411-rocky-linux-90.html

[研究]Docker 20.10.6安裝 (Windows Server 2019)

[研究]Docker Compose 1.29.2 安裝 (Ubuntu 20.04.2 LTS x64)

[研究] docker 安裝 (Ubuntu 20.04.2 LTS x64)

[研究]Docker Compose 1.29.2 安裝 (CentOS 8.4)

[研究]docker 20.10.7 安裝 (CentOS 8.4)

[研究] Docker 1.7.1 自動化應用程式部署工具 安裝 (CentOS 7.1 x64)


1 則留言: