首先,上图,该图出自Docker —— 从入门到实践的附录部分,基本概括了docker的所有命令。
从图中可以看到,对用户来说,大部分命令都是针对仓库(repository),镜像(image),容器(container)操作使用的,其他还包括管理命令,比如网络(network),卷(volume),节点(node)等的管理。
通过shell查看docker的帮助文档
$ docker --help
Usage: docker COMMAND
A self-sufficient runtime for containers
Options:
--config string Location of client config files (default
"/home/blinkdr/.docker")
-D, --debug Enable debug mode
--help Print usage
-H, --host list Daemon socket(s) to connect to
-l, --log-level string Set the logging level
("debug"|"info"|"warn"|"error"|"fatal") (default "info")
--tls Use TLS; implied by --tlsverify
--tlscacert string Trust certs signed only by this CA (default
"/home/blinkdr/.docker/ca.pem")
--tlscert string Path to TLS certificate file (default
"/home/blinkdr/.docker/cert.pem")
--tlskey string Path to TLS key file (default
"/home/blinkdr/.docker/key.pem")
--tlsverify Use TLS and verify the remote
-v, --version Print version information and quit
Management Commands:
container Manage containers
image Manage images
network Manage networks
node Manage Swarm nodes
plugin Manage plugins
secret Manage Docker secrets
service Manage services
stack Manage Docker stacks
swarm Manage Swarm
system Manage Docker
volume Manage volumes
Commands:
attach Attach local standard input, output,