二、docker安装

文章介绍了Docker自17.03版本后分为社区版(CE)和企业版(EE),两者在支持和服务上的差异。随后详细讲述了在CentOS7.x上安装DockerCE的过程,包括关闭防火墙和SELinux,安装依赖,添加Docker源,选择并安装特定版本,以及启动Docker服务的步骤。
摘要由CSDN通过智能技术生成

1、docker版本简介

随着Docker的不断流行与发展,docker公司(或称为组织)也开启了商业化之路,Docker 从 17.03版本之后分为 CE(Community Edition) 和 EE(Enterprise Edition)。我们来看看他们之前的区别于联系。

docker-ee:

Docker EE由公司支持,可在经过认证的操作系统和云提供商中使用,并可运行来自Docker Store的、经过认证的容器和插件。

docker-ce:

Docker CE是免费的Docker产品的新名称,Docker CE包含了完整的Docker平台,非常适合开发人员和运维团队构建容器APP。事实上,Docker CE 17.03,可理解为Docker 1.13.1的Bug修复版本。因此,从Docker 1.13升级到Docker CE 17.03风险相对是较小的。

可前往Docker的RELEASE log查看详情https://github.com/docker/docker/releases 。

Docker公司认为,Docker CE和EE版本的推出为Docker的生命周期、可维护性以及可升级性带来了巨大的改进。

2、CentOS 7.x安装docker-ce

官方安装文档:https://docs.docker.com/engine/install/centos/

 1. 关闭防火墙和selinux

[root@cluster-node-1 ~]# systemctl stop firewalld.service 
[root@cluster-node-1 ~]# setenforce 0

2. 安装docker依赖

#yum utils提供yum config manager应用程序,设备映射器持久数据和lvm2是设备映射器存储驱动程序所必需的
[root@cluster-node-1 ~]# yum install -y yum-utils device-mapper-persistent-data lvm2

3. 安装docker官网源

[root@cluster-node-1 ~]# yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

或者使用阿里云源
[root@cluster-node-1 ~]# yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

4.  安装docker-ce最新版

[root@cluster-node-1 ~]#  yum -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

5. 安装docker指定版本

#查看yum源支持的所有版本
[root@cluster-node-1 ~]# yum list docker-ce --showduplicates | sort -r
 * updates: mirrors.bupt.edu.cn
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror, langpacks
Installed Packages
 * extras: mirrors.bupt.edu.cn
docker-ce.x86_64            3:23.0.3-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 


[root@cluster-node-1 ~]# yum -y install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io docker-buildx-plugin docker-compose-plugin

!!!!!!!!!!!!!!!请注意变量

6. 启动docker

[root@cluster-node-1 ~]# systemctl start docker.service

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

微风◝

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值