* docker images * docker ps * docker ps -l * docker ps -a * docker logs [NAMES] * docker logs -f [NAMES] # -f = tail -f * docker inspect nostalgic_morse ---- * run -i -t ubuntu:14.04 /bin/bash * docker run -d ubuntu:14.04 /bin/sh -c "while true; do echo hello world; sleep 1; done" * docker run -d -p 80:5000 training/webapp python app.py * docker restart [NAMES] #重启服务 * docker rm [NAMES] # 删除容器 * docker ps -a|grep -v "NAMES" | awk '{print $NF}'|xargs docker rm 删除所有容器 * docker pull centos * docker push [NAMES] * docker rmi [NAMES] ---- ==== 创建docker镜像 ==== 方法1: * 启动容器 * 修改容器 * 退成容器 * 提交 方法2: * 创建Dockerfile * docker build -t fangqiang:v1 .