我的电脑是win10,虽然现在win10开始也支持docker,但在linux机器会合适些,所以我先用VMware创建一个linux虚拟机--Centos7

安装虚拟机不多说,现在开始安装docker

1、删除docker(如果有的话)

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

2、安装一些系统必要的工具

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

3、获取docker的yum源

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

4、更新yum缓存

yum makecache fast

5、安装docker

yum -y install docker-ce

6、启动docker

systemctl start docker

7、测试运行

docker run hello-world

8、由于是学习用,所以我还安装一些工具

yum install -y git vim gcc glibc-static telnet bridge-utils net-tools

9、查看本地拥有的image,hello world是第七步运行image时下载的。

[root@localhost ~]# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest fce289e99eb9 months ago .84kB
[root@localhost ~]#

image说明如下,bootfs是内核,在上面有不同的base image,也就是各种发行版,Centos、Ubuntu、Debian等,在base image上可以安装软件(eg apache)构成新的image#2,在image#2上安装mysql可以构成新的image#4,

image#4 和image2可以共享相同的layer,也就是base image。

最新文章

  1. 用scikit-learn学习K-Means聚类
  2. JS获取地址栏参数的方法
  3. CentOS 6 安装 MySQL-python
  4. ssh(sturts2_spring_hibernate) 框架搭建之JPA代替hibernate
  5. log4j配置文件详解
  6. BZOJ 2080: [Poi2010]Railway 双栈排序
  7. fibonacci数列的和取余(1)
  8. HDU 1695 GCD (莫比乌斯反演)
  9. OSG addEventHandler W键 L键 F键
  10. 【Inno Setup】 Inno Setup 64位安装程序默认安装路径
  11. coconHashMap实现原理分析
  12. 临时和永久修改oracle sysdate的默认输出格式
  13. javacript 组合使用构造函数模式和原型模式
  14. 20160224.CCPP体系详解(0034天)
  15. AndroidStudio制作欢迎界面与应用图标
  16. Linux-nmon系统性能监控工具的使用及报表产出
  17. Ubuntu 16.04 不能用inittab 设置 运行等级 runlevel
  18. FastDFS配置 ***
  19. MUI音乐播放html5+audio模块
  20. calcite介绍

热门文章

  1. IE兼容模式下样式分离错乱,求CSS高手
  2. Ansible@一个高效的配置管理工具--Ansible configure management--翻译(三)
  3. samba 添加新用户
  4. MyBatis中XML 映射配置文件的简单介绍
  5. ftp搭建记录
  6. C中进制, 原码, 反码与补码的简单用法
  7. postman使用之四:设置读取变量和切换环境
  8. jackson 问题定位
  9. go语言从例子开始之Example11.range遍历
  10. JS中的call()和apply()方法(转)