yum install -y yum-utils device-mapper-persistent-data lvm2
安装所需的包

# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# 添加官方yum源,速度非常慢,不推荐,忽略

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
添加阿里yum源,速度飞快

yum makecache fast

把服务器的包信息下载到本地缓存起来

yum install docker-ce
安装最新版本的Docker CE(社区版)
按两次Y确认

systemctl start docker
启动Docker

systemctl enable docker
设置开机启动

使用阿里云镜像加速

https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors

docker run hello-world
通过运行hello-world镜像验证安装是否正确

docker images hello-world
查看hello-world镜像信息

REPOSITORY:来自于哪个仓库
TAG:标签(镜像的发行版本)
IMAGE ID:ID(唯一)
CREATED:创建时间
SIZE:大小

docker version
查看docker版本信息

有Client和Server两部分表示docker安装启动都成功了

docker --version
查看docker版本

# sudo yum remove docker docker-common docker-selinux docker-engine
(彻底卸载)

最新文章

  1. JQuery的核心的一些方法[扒来的]
  2. 在tomcat中配置jdk的不同版本
  3. ThreadPoolExecutor机制
  4. Github for Windows使用介绍
  5. 【初识 JQMobile 小小总结】
  6. Informix SDK對比
  7. JSF 2 panelGrid example
  8. File List()列出文件目录
  9. SQL 查询的执行过程
  10. iOS极光推送
  11. OpenCV学习 6:平滑滤波器 cvSmooth()——2
  12. 树莓派+Android Things
  13. 转:Jmeter 用户思考时间(User think time),定时器,和代理服务器(proxy server)
  14. cocos2d-x 读写 xml 文件
  15. Eclipse 开发设置编码格式--4个修改地方完美
  16. 【BZOJ1417】Pku3156 Interconnect
  17. JS产生徐特尔图表
  18. Namespace declaration statement has to be the very first statement or after any declare call in the script
  19. Neko and Aki's Prank CodeForces - 1152D (括号序列,dp)
  20. 初识Qt涂鸦板绘制

热门文章

  1. layui父页面执行子页面方法
  2. controller进行数据保存以及作用域
  3. c++基础(七)——面向对象程序设计
  4. 函数的练习2——python编程从入门到实践
  5. Vasya and Shifts CodeForces - 832E (高斯消元)
  6. c# 异步( Async ) 不是多线程
  7. 在Unity中创建VR游戏
  8. Layui学习笔记(一)—— 关于模块的扩展
  9. django+celery+redis环境配置
  10. springboot整合ActiveMQ1(基本使用)