Docker command quick query
Basic syntax
docker [OPTIONS] COMMAND [arg...]
Option
-D = true | false: debug mode. The default value is false. -H, -- host = [unix: // var/run/docker. sock]: tcp: // [host: port] to bind or use unix: // [/path/to/socket. The socket bound in daemon mode uses one or more tcp: // host: port, unix: // path/to/socket, fd: // * or fd: // socketfd to specify. -- Api-enable-cors = true | false enable CORS headers in the Remote API. The default value is false. -B = "" mounts the container to an existing bridge. If 'none' is specified, the network of the container is disabled. -- Bip = "" allows the dynamically created docker0 to use the given CIDR address. It is mutually exclusive with the-B option. -D = true | false uses the daemon mode. The default value is false. -- Dns = "" Let Docker use the given DNS server. -G = "" specifies the root path of the Docker runtime. The default value is/var/lib/docker. -- Icc = true | false enables inter-container communication. The default value is true. -- Ip = "" default ip address used to bind a port. The default value is 0.0.0.0. -- Iptables = true | false: Disable Docker from adding iptables rules. The default value is true. -- Mtu = VALUE specifies the mtu of the container network. The default value is 1500. -P = "" specifies the daemon PID file path. The default value is/var/run/docker. pid. -S = "" Force Docker to use the given storage driver when running. -V = true | false: outputs the version information and exits. The default value is false. -- Selinux-enabled = true | false enable SELinux support. The default value is false. SELinux currently does not support the BTRFS storage driver.
Command
Docker commands can be executed using docker-CMD or docker CMD. The two are the same.
Docker-attach (1) is attached to a running container. Docker-build (1) Create an imagedocker-commit from a Dockerfile (1) Create a New imagedocker-cp (1) from a container's modifications) copy the file from the container to the host system docker-diff (1) Check the modification of a container File System docker-events (1) Get the real-time event docker-export (1) from the server) export the container content as a tar package docker-history (1) display the history of an image docker-images (1) list existing imagedocker-import (1) import a tar package to create an imagedocker-info (1). Some Related System Information docker-inspect (1) is displayed. Docker-kill (1) close a running container (including processes and all resources) docker-load (1) load an imagedocker-login (1) from A tar package) register or log on to a Docker repository server docker-logout (1) log out of Docker-logs from the docker repository server (1) Get the container log information docker-pause (1) pause all processes in a container docker-port (1) find a public port that is nat to a private network port docker-ps (1) List containers docker-pull (1) pull an image or repository Docker-push (1) from a docker registration server to push an image or repository to a Docker registration server docker-restart (1) restart a running container docker-rm (1) delete several specified containers docker-rmi (1) delete several specified imagedocker-run (1) create a new container, run the given command docker-save (1) to save an image as the tar package file docker-search (1) search for an imagedocker-start (1) in the Docker index) start a container docker-stop (1) terminate a running container docker-tag (1) tag an image docker-top (1) view the running process information in a container docker-unpause (1) Restore all processes in a container from the paused state docker-version (1) output Docker version information docker-wait (1) blocking until a container is terminated, and then output its exit character
From: https://www.gitbook.io/book/yeasy/docker_practice/