CentOS7 安装最新版docker

安装最新版Docker on Centos7

一、INSTALL DOCKER CE社区版

先卸载系统自带的旧版本

$ sudo yum remove docker \

                  docker-common \

                  docker-selinux \

                  docker-engine

二、Install using the repository 安装仓库

1.      安装依赖包:

$ sudo yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

2.      安装最新稳定版仓库地址:

 

$ sudo yum-config-manager \
    --add-repo\
    https://download.docker.com/linux/centos/docker-ce.repo

 

3.      可选:安装edge和test版

$ sudo yum-config-manager --enable docker-ce-edge
$ sudo yum-config-manager --enable docker-ce-test
 
三、开始安装

安装最新版docker  ce– 稳定版

$ sudo yum install docker-ce

 

 

接受签名:回y

060A61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35.

四、开始使用docker

1.启动命令

$ sudo systemctl start docker

2.启动hello world

如果是第一次启动,将自动下载hello-world image并运行

$ sudo docker run hello-world

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值