docker_practice/appendix/command/README.md

130 lines
8.4 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Docker
##
Docker Docker Daemon
* `docker [OPTIONS] COMMAND [arg...]`
* `dockerd [OPTIONS]`
`man docker` `docker help`
##
* `--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
## dockerd
* `--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
##
`docker COMMAND --help`
* `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`退
## Docker
![Docker ](../_images/cmd_logic.png)