docker_practice/appendix/command/README.md

130 lines
8.4 KiB
Go
Raw Permalink Normal View History

2016-12-10 17:00:25 +08:00
# Docker
##
2017-12-01 16:50:45 +08:00
Docker Docker Daemon
2016-12-10 17:00:25 +08:00
* `docker [OPTIONS] COMMAND [arg...]`
2017-12-01 16:50:45 +08:00
* `dockerd [OPTIONS]`
2016-12-10 17:00:25 +08:00
`man docker` `docker help`
##
2018-12-13 20:41:39 +08:00
* `--config=""` `~/.docker`
* `-D=true|false`使 debug
* `-H, --host=[]` Docker unix `unix:///path/to/socket` `fd://socketfd` tcp `tcp://[host[:port]]` `unix:///var/run/docker.sock`
* `-l, --log-level="debug|info|warn|error|fatal"`
* `--tls=true|false` Docker TLS
* `--tlscacert=/.docker/ca.pem`TLS CA
* `--tlscert=/.docker/cert.pem`TLS
* `--tlscert=/.docker/key.pem`TLS
* `--tlsverify=true|false` TLS
2016-12-10 17:00:25 +08:00
2017-12-01 16:50:45 +08:00
## dockerd
2018-12-13 20:41:39 +08:00
* `--api-cors-header=""`CORS CORS访 "*"
* `--authorization-plugin=""`
* `-b=""` `none` `--bip`
* `--bip=""` `docker0` CIDR ; `-b`
* `--cgroup-parent=""` cgroup fs cgroup `/docker`systemd cgroup `system.slice`
* `--cluster-store=""` `Swarm`
* `--cluster-advertise=""`访 `host:port` `interface:port`
* `--cluster-store-opt=""`
* `--config-file="/etc/docker/daemon.json"`daemon
* `--containerd=""`containerd
* `-D, --debug=true|false`使 Debug false
* `--default-gateway=""` IPv4
* `--default-gateway-v6=""` IPv6
* `--default-ulimit=[]` ulimit
* `--disable-legacy-registry=true|false`访
* `--dns=""`使 DNS
* `--dns-opt=""`DNS
* `--dns-search=[]`DNS
* `--exec-opt=[]`
* `--exec-root=""` `/var/run/docker`
* `--fixed-cidr=""` IPv4
* `--fixed-cidr-v6=""` IPv6
* `-G, --group=""` unix `docker`
* `-g, --graph=""`Docker `/var/lib/docker`
* `-H, --host=[]` Docker daemon unix `unix:///path/to/socket` `fd://socketfd` tcp `tcp://[host[:port]]` `unix:///var/run/docker.sock`
* `--icc=true|false` daemon true
* `--insecure-registry=[]`访
* `--ip=""` IP `0.0.0.0`
* `--ip-forward=true|false` Docker IP
* `--ip-masq=true|false`访
* `--iptables=true|false` Docker iptables true
* `--ipv6=true|false` IPv6
* `-l, --log-level="debug|info|warn|error|fatal"`
* `--label="[]"`
* `--log-driver="json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs|none"` `json-file`
* `--log-opt=[]`
* `--mtu=VALUE` `mtu`
* `-p=""` daemon PID `/var/run/docker.pid`
* `--raw-logs`
* `--registry-mirror=<scheme>://<host>` `docker pull` 使
* `-s, --storage-driver=""`使
* `--selinux-enabled=true|false` SELinux falseSELinux overlay
* `--storage-opt=[]`
* `--tls=true|false` Docker daemon TLS
* `--tlscacert=/.docker/ca.pem`TLS CA
* `--tlscert=/.docker/cert.pem`TLS
* `--tlscert=/.docker/key.pem`TLS
* `--tlsverify=true|false` TLS
* `--userland-proxy=true|false`使 true
* `--userns-remap=default|uid:gid|user:group|user|uid` UID GID
2016-12-10 17:00:25 +08:00
##
2017-12-01 16:50:45 +08:00
`docker COMMAND --help`
2016-12-10 17:00:25 +08:00
2018-12-13 20:41:39 +08:00
* `attach`
* `build` Dockerfile
* `commit`
* `cp`宿
* `create`
* `diff`
* `events`
* `exec`
* `export` `tar`
* `history`
* `images`
* `import` `tar`
* `info`
* `inspect`
* `kill` ()
* `load` tar
* `login` Docker
* `logout` Docker
* `logs` log
* `network` Docker
* `node` swarm /
* `pause`
* `port` nat
* `ps`
* `pull`Docker
* `push` Docker
* `rename`
* `restart`
* `rm`
* `rmi`
* `run`
* `save` tar
* `search` Docker index
* `service` Docker
* `start`
* `stats`使
* `stop`
* `swarm` Docker swarm 退
* `tag`
* `top`
* `unpause`
* `update`
* `version` Docker
* `volume` Docker volume
* `wait`退
2016-12-10 17:00:25 +08:00
## Docker
![Docker ](../_images/cmd_logic.png)