CentOS Docker 部署

Docker 的安装

Docker 支持以下的CentOS版本:
CentOS 7 (64-bit)
CentOS 6.5 (64-bit) 或更高的版本

前提条件

目前 CentOS 仅发行版本中的内核支持Docker
Docker 运行在CentOS 7上,要求系统为64位、系统内核版本为 3.10 以上
Docker 运行在CentOS-6.5 或更高的版本的CentOS 上,要求系统为64位、系统内核版本为2.6.32-431 或者更高版本


使用yum 安装(CentOS 7下)
Docker 要求 CentOS 系统的内核版本高于3.10,查看本页面的前提条件来验证你的CentOS版本是否支持Docker

[root@localhost ~]# uname -r 
3.10.0-693.el7.x86_64

配置安装yum 源
https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

[root@localhost yum.repos.d]# yum install -y epel-release
[root@localhost yum.repos.d]# ls    
CentOS-Base.repo  docker-ce.repo  epel.repo  epel-testing.repo

安装依赖包

[root@localhost ~]# yum install -y lvm2-2.02.180-10.el7_6.3.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirror.xeonbd.com
Resolving Dependencies
--> Running transaction check
---> Package lvm2.x86_64 7:2.02.180-10.el7_6.3 will be installed
--> Finished Dependency Resolution

安装docker-ce (社区免费版)

[root@localhost yum.repos.d]# yum install docker-ce

启动docker 服务

[root@localhost ~]# systemctl start docker 

docker 默认需要去访问DockerHub 拉去镜像

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值