通用命令
docker
docker command --help
bind mount
-v D:/code:/app
volume
-v db-data:/app
tmpfs mount
-p 9090:8080
docker network create test-nt
镜像相关命令
docker images
docker search httpd
docker pull ubuntu:13.10
docker rmi hello-world
docker commit -m="has update" -a="runoob" 04b2af4c5895 runoob/ubuntu:v2
docker build -t runoob/centos:6.7 .
docker tag 2b0712122e57 runoob/centos:dev
docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
容器相关命令
docker ps -a
docker run -it ubuntu /bin/bash
docker run -itd --name ubuntu-test ubuntu /bin/bash
docker stop <容器 ID>
docker start a1abf166aa09
ocker restart <容器 ID>
docker attach 8462af85f1b0
docker exec -it 8462af85f1b0 /bin/bash
docker logs [OPTIONS] CONTAINER
docker top CONTAINER [ps OPTIONS]
docker export 8462af85f1b0 > ubuntu.tar
cat ubuntu.tar | docker import - test/ubuntu:v1
docker import http://example.com/exampleimage.tgz example/imagerepo
docker rm -f 8462af85f1b0
docker container prune
网络相关命令
docker port CONTAINER [PRIVATE_PORT[/PROTO]]