docker中文网手册:http://www.docker.org.cn/book/docker/what-is-docker-16.html
使用方法
常用命令
查看docker版本:docker version
查找docker镜像:docker search tutorial
下载容器镜像:docker pull learn/tutorial
在docker容器中运行HelloWorld:docker run learn/tutorial echo "hello word"
在容器中安装新的程序:docker run learn/tutorial apt-get install -y ping
列出安装的容器id:docker ps -l
保存对容器的修改:docker commit 340fdd40bd56 learn/ping
运行新的镜像:docker run lean/ping ping www.google.com`
检查运行中的镜像:docker inspect 340fdd40bd56
发布自己的镜像:docker push learn/ping
常见问题
1、查看CentOS系统版本。
cat /etc/redhat-release
执行结果:CentOS Linux release 7.6.1810 (Core)