Docker之二:linux下Docker安装

1.安装yum工具包和 两个容器的数据存储驱动

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

2.设置新的docker安装源 阿里

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

3.扫描哪个快,优先使用阿里云的

yum makecache fast

4.安装社区版本docker

yum -y install docker-ce

5.启动docker : service docker start

 6.验证:docker version

7.拉取hello-world镜像:docker pull hello-world

 8.创建hello-world容器运行:docker run hello-world

 9.容器镜像服务

配置镜像加速的地址,重新加载并重启docker服务

 10.拉取tomcat镜像:docker pull tomcat

原文地址:https://www.cnblogs.com/helq/p/14205027.html