Merge pull request #529 from hellozrh/hellozrh-patch

Fix installation steps when offline
This commit is contained in:
Baohua Yang 2023-08-01 17:49:18 -07:00 committed by GitHub
commit f34a985a78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ sudo yum list docker-ce --showduplicates|sort -r
Loading mirror speeds from cached hostfile Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror Loaded plugins: fastestmirror
docker-ce.x86_64 3:19.03.8-3.el7 docker-ce-stable docker-ce.x86_64 24.0.4-1.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.7-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.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.5-3.el7 docker-ce-stable
@ -46,7 +46,7 @@ docker-ce.x86_64 3:19.03.1-3.el7 docker-ce-stable
#### 下载到指定文件夹(A) #### 下载到指定文件夹(A)
```bash ```bash
sudo yum install --downloadonly --downloaddir=/tmp/docker-19.03 docker-ce-19.03.8-3.el7 docker-ce-cli-19.03.8-3.el7 sudo yum install --downloadonly --downloaddir=/tmp/docker24_offline_install/ docker-ce-24.0.4-1.el7 docker-ce-cli-24.0.4-1.el7
``` ```
```bash ```bash
@ -56,11 +56,11 @@ Dependencies Resolved
Package Arch Version Repository Size Package Arch Version Repository Size
==================================================================================================================================================================================== ====================================================================================================================================================================================
Installing: Installing:
docker-ce x86_64 3:19.03.8-3.el7 docker 25 M docker-ce x86_64 24.0.4-1.el7 docker 25 M
Installing for dependencies: Installing for dependencies:
container-selinux noarch 2:2.107-3.el7 extras 39 k container-selinux noarch 24.0.4-1.el7 extras 39 k
containerd.io x86_64 1.2.13-3.1.el7 docker 23 M containerd.io x86_64 24.0.4-1.el7 docker 23 M
docker-ce-cli x86_64 1:19.03.8-3.el7 docker 40 M docker-ce-cli x86_64 24.0.4-1.el7 docker 40 M
Transaction Summary Transaction Summary
==================================================================================================================================================================================== ====================================================================================================================================================================================
@ -69,10 +69,10 @@ Install 1 Package (+3 Dependent packages)
Total download size: 87 M Total download size: 87 M
Installed size: 363 M Installed size: 363 M
Background downloading packages, then exiting: Background downloading packages, then exiting:
(1/4): container-selinux-2.107-3.el7.noarch.rpm | 39 kB 00:00:00 (1/4): container-selinux-24.0.4-1.el7.noarch.rpm | 39 kB 00:00:00
(2/4): containerd.io-1.2.13-3.1.el7.x86_64.rpm | 23 MB 00:00:00 (2/4): containerd.io-24.0.4-1.el7.x86_64.rpm | 23 MB 00:00:00
(3/4): docker-ce-19.03.8-3.el7.x86_64.rpm | 25 MB 00:00:00 (3/4): docker-ce-24.0.4-1.el7.x86_64.rpm | 25 MB 00:00:00
(4/4): docker-ce-cli-19.03.8-3.el7.x86_64.rpm | 40 MB 00:00:00 (4/4): docker-ce-cli-24.0.4-1.el7.x86_64.rpm | 40 MB 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 118 MB/s | 87 MB 00:00:00 Total 118 MB/s | 87 MB 00:00:00
exiting because "Download Only" specified exiting because "Download Only" specified
@ -105,7 +105,7 @@ sudo yum versionlock list
```bash ```bash
Loaded plugins: fastestmirror, versionlock Loaded plugins: fastestmirror, versionlock
3:docker-ce-18.09.9-3.el7.* 3:docker-ce-24.0.4-1.el7.*
versionlock list done versionlock list done
``` ```
@ -116,7 +116,7 @@ sudo yum install docker-ce
Loaded plugins: fastestmirror, versionlock Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile Loading mirror speeds from cached hostfile
Excluding 1 update due to versionlock (use "yum versionlock status" to show it) Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
Package 3:docker-ce-18.09.9-3.el7.x86_64 already installed and latest version Package 3:docker-ce-24.0.4-1.el7.x86_64 already installed and latest version
Nothing to do Nothing to do
``` ```
@ -128,7 +128,7 @@ sudo yum versionlock delete docker-ce
```bash ```bash
Loaded plugins: fastestmirror, versionlock Loaded plugins: fastestmirror, versionlock
Deleting versionlock for: 3:docker-ce-18.09.9-3.el7.* Deleting versionlock for: 3:docker-ce-24.0.4-1.el7.*
versionlock deleted: 1 versionlock deleted: 1
``` ```
@ -246,4 +246,3 @@ sudo systemctl enable docker
``` ```