本文共 522 字,大约阅读时间需要 1 分钟。
Docker 1.12 非swarm模式的常用命令:
1.查看信息
docker version
docker --version docker info docker images docker images -q#只给出images id2.基于一个镜像启动一个容器 docker run -d --name myweb -p 8080:8080 one_images
docker stop myweb docker start myweb docker rm myweb #删除容器
3.查看容器进程
docker ps -a
docker ps -aq #只有containers id4.从Docker Hub中在线获取一个镜像,指定名称和版本 docker pull ubuntu:14.04
删除本地镜像 docker rmi ubuntu:14.04 #删除镜像文件
5.从Docker Hub中在线获取并启动一个容器
docker run hello-world
docker push new_tag
转载地址:http://xxlai.baihongyu.com/