Centos7下Docker的安装与使用

安装docker

Centos7的yum源修改为阿里镜像源 http://www.cnblogs.com/juneman/p/8594633.html

安装docker  yum install docker

安装完成后启动docker  service docker start

查看版本  docker version

使用docker

检索镜像  docker search IMAGENAME,如检索centos镜像  docker search centos

下载镜像  docker pull IMAGENAME,不出意外的话会失败error pulling image configuration,解决方案:http://www.cnblogs.com/juneman/p/8595038.html

启动容器并执行命令  docker run IMAGENAME COMMAND,centos下来个经典的hello,world  docker run centos echo 'Hello world'

查看更多:

http://www.runoob.com/docker/docker-tutorial.html

https://blog.csphere.cn/archives/22

原文地址:https://www.cnblogs.com/juneman/p/8594678.html