Dockerをrhel7.5バージョンにインストールするために以下を用意します
(リストから https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ )、および最新のもののみ
curl https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-19.03.8-3.el7.x86_64.rpm -o docker.rpm
curl http://mirror.centos.org/centos/7.3.1611/extras/x86_64/Packages/docker-ce-selinux-17.03.3.ce-1.el7.noarch.rpm -o containerselinux.rpm
curl http://mirror.centos.org/centos/7.3.1611/extras/x86_64/Packages/docker-ce-cli-19.03.8-3.el7.x86_64.rpm -o docker-ce-cli.rpm
curl http://mirror.centos.org/centos/7.3.1611/extras/x86_64/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm -o containerd.io.rpm
ファイルは次のとおりです。
-rw-r--r-- 1 root root 25697324 May 8 13:17 docker.rpm
-rw-r--r-- 1 root root 7793 May 8 13:18 containerselinux.rpm
-rw-r--r-- 1 root root 7793 May 8 13:21 docker-ce-cli.rpm
-rw-r--r-- 1 root root 7793 May 8 13:24 containerd.io.rpm
それらすべてをインストールしたくない
yum localinstall -y docker-ce-cli.rpm containerselinux.rpm docker.rpm containerd.io.rpm
Loaded plugins: langpacks
configuration
Cannot open: docker-ce-cli.rpm. Skipping.
Cannot open: containerselinux.rpm. Skipping.
Examining docker.rpm: 3:docker-ce-19.03.8-3.el7.x86_64
Marking docker.rpm to be installed
Cannot open: containerd.io.rpm. Skipping.
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 3:19.03.8-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-19.03.8-3.el7.x86_64
--> Processing Dependency: containerd.io >= 1.2.2-3 for package: 3:docker-ce-19.03.8-3.el7.x86_64
--> Processing Dependency: docker-ce-cli for package: 3:docker-ce-19.03.8-3.el7.x86_64
--> Finished Dependency Resolution
Error: Package: 3:docker-ce-19.03.8-3.el7.x86_64 (/docker)
Requires: container-selinux >= 2:2.74
Error: Package: 3:docker-ce-19.03.8-3.el7.x86_64 (/docker)
Requires: docker-ce-cli
Error: Package: 3:docker-ce-19.03.8-3.el7.x86_64 (/docker)
Requires: containerd.io >= 1.2.2-3
You could try using --skip-broken to work around the problem
We not understand why we get
Requires: docker-ce-cli
Requires: containerd.io >= 1.2.2-3
Requires: container-selinux >= 2:2.74
最新バージョンをインストールしたので
2番目
私たちも得る
Cannot open: docker-ce-cli.rpm. Skipping.
Cannot open: containerselinux.rpm. Skipping.
しかし、私のカールの何が問題になっていますか?
正しいURLを修正して設定した後も、次のようになります。
yum localinstall docker.rpm containerselinux.rpm docker-ce-cli.rpm containerd.io.rpm -y
Loaded plugins: langpacks
Examining docker.rpm: 3:docker-ce-19.03.8-3.el7.x86_64
Marking docker.rpm to be installed
Examining containerselinux.rpm: docker-ce-selinux-17.03.3.ce-1.el7.noarch
Marking containerselinux.rpm to be installed
Examining docker-ce-cli.rpm: 1:docker-ce-cli-19.03.8-3.el7.x86_64
Marking docker-ce-cli.rpm to be installed
Examining containerd.io.rpm: containerd.io-1.2.6-3.3.el7.x86_64
Marking containerd.io.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.6-3.3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.2.6-3.3.el7.x86_64
| 4.3 kB 00:00:00
---> Package docker-ce.x86_64 3:19.03.8-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-19.03.8-3.el7.x86_64
---> Package docker-ce-cli.x86_64 1:19.03.8-3.el7 will be installed
---> Package docker-ce-selinux.noarch 0:17.03.3.ce-1.el7 will be installed
Removing docker-ce-selinux.noarch 0:17.03.3.ce-1.el7 - u due to obsoletes from docker-ce.x86_64 3:19.03.8-3.el7 - u
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.6-3.3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.2.6-3.3.el7.x86_64
---> Package docker-ce.x86_64 3:19.03.8-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-19.03.8-3.el7.x86_64
---> Package docker-ce-selinux.noarch 0:17.03.3.ce-1.el7 will be installed
--> Finished Dependency Resolution
Error: Package: containerd.io-1.2.6-3.3.el7.x86_64 (/containerd.io)
Requires: container-selinux >= 2:2.74
Error: Package: 3:docker-ce-19.03.8-3.el7.x86_64 (/docker)
Requires: container-selinux >= 2:2.74
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
containerselinux.rpm
、docker-ce-cli.rpm
、およびdocker-ce-cli.rpm
は実際にはRPMではなく、ダウンロードに間違ったURLを使用したため、404エラーのあるHTMLです。それらを削除し、正しいURLから再ダウンロードしてください。