Redhat7.9上安装Docker

Redhat7.9上安装Docker

一、linux环境说明

Red Hat Enterprise Linux 7.9 下载后(见参考1),vmware安装虚拟机

[root@localhost /]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)
[root@localhost /]#  cat /proc/version
Linux version 3.10.0-1160.el7.x86_64 (mockbuild@x86-vm-26.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Tue Aug 18 14:50:17 EDT 2020

二、离线安装docker

step1:Uninstall old versions 卸载老版本

yum remove docker \
            docker-client \
            docker-client-latest \
            docker-common \
            docker-latest \
            docker-latest-logrotate \
            docker-logrotate \
            docker-engine

step2:离线安装docker相关组件

如果在线安装latest版本命令为:yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

前往网址https://download.docker.com/linux/centos/7/x86_64/stable/Packages/下载相应的rpm包,并将相关rpm包放置在指定文件夹下,如/opt/findig/PYTHON/docker-rpm/

cd /opt/findig/PYTHON/docker-rpm/

yum install docker-ce-rootless-extras-23.0.3-1.el7.x86_64.rpm docker-ce-23.0.3-1.el7.x86_64.rpm docker-ce-cli-23.0.3-1.el7.x86_64.rpm containerd.io-1.6.9-3.1.el7.x86_64.rpm docker-buildx-plugin-0.10.4-1.el7.x86_64.rpm docker-compose-plugin-2.6.0-3.el7.x86_64.rpm

#docker-ce-rootless-extras-23.0.3-1.el7.x86_64.rpm 是由于安装报错Error: Package: 3:docker-ce-23.0.3-1.el7.x86_64 (/docker-ce-23.0.3-1.el7.x86_64),Requires: docker-ce-rootless-extras
#安装时显示需要依赖其他的yum包,但是内网是非在线环境,不定能yum这些包,因此这个问题后续需要继续留意。on todo list

yum install docker-ce-rootless-extras-23.0.3-1.el7.x86_64.rpm docker-ce-23.0.3-1.el7.x86_64.rpm docker-ce-cli-23.0.3-1.el7.x86_64.rpm containerd.io-1.6.9-3.1.el7.x86_64.rpm docker-buildx-plugin-0.10.4-1.el7.x86_64.rpm docker-compose-plugin-2.6.0-3.el7.x86_64.rpm
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Repository base is listed more than once in the configuration
Examining docker-ce-rootless-extras-23.0.3-1.el7.x86_64.rpm: docker-ce-rootless-extras-23.0.3-1.el7.x86_64
Marking docker-ce-rootless-extras-23.0.3-1.el7.x86_64.rpm to be installed
Examining docker-ce-23.0.3-1.el7.x86_64.rpm: 3:docker-ce-23.0.3-1.el7.x86_64
Marking docker-ce-23.0.3-1.el7.x86_64.rpm to be installed
Examining docker-ce-cli-23.0.3-1.el7.x86_64.rpm: 1:docker-ce-cli-23.0.3-1.el7.x86_64
Marking docker-ce-cli-23.0.3-1.el7.x86_64.rpm to be installed
Examining containerd.io-1.6.9-3.1.el7.x86_64.rpm: containerd.io-1.6.9-3.1.el7.x86_64
Marking containerd.io-1.6.9-3.1.el7.x86_64.rpm to be installed
Examining docker-buildx-plugin-0.10.4-1.el7.x86_64.rpm: docker-buildx-plugin-0.10.4-1.el7.x86_64
Marking docker-buildx-plugin-0.10.4-1.el7.x86_64.rpm to be installed
Examining docker-compose-plugin-2.6.0-3.el7.x86_64.rpm: docker-compose-plugin-2.6.0-3.el7.x86_64
Marking docker-compose-plugin-2.6.0-3.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.x86_64 0:1.6.9-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.6.9-3.1.el7.x86_64
Loading mirror speeds from cached hostfile
 * elrepo: mirrors.tuna.tsinghua.edu.cn
---> Package docker-buildx-plugin.x86_64 0:0.10.4-1.el7 will be installed
---> Package docker-ce.x86_64 3:23.0.3-1.el7 will be installed
---> Package docker-ce-cli.x86_64 1:23.0.3-1.el7 will be in
  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
在Red Hat Enterprise Linux 7.9上安装Docker可以按照以下步骤进行操作: 1. 首先,卸载旧版本的Docker,以确保接下来的安装顺利进行。可以使用以下命令进行卸载: ``` yum remove docker docker-common docker-selinux docker-engine ``` 2. 然后,安装Docker。如果你想要安装最新版本的Docker,可以使用以下命令进行在线安装: ``` yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ``` 请注意,这是在线安装的命令,需要确保你的系统可以连接到互联网。 如果你希望进行离线安装,你需要先下载Docker相关组件并进行安装。你可以从官方网站下载适用于Red Hat Enterprise Linux的Docker离线安装包,然后按照安装指南进行操作。 希望这些信息对你有所帮助!<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [Redhat7.9上安装Docker](https://blog.csdn.net/lixiaoxuan2019/article/details/130068371)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* [Centos或RedHat安装docker:(用yum安装)](https://blog.csdn.net/w15133895262/article/details/124170203)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值