Container Engine
Docker daemon is a system process that resides in the background. Before you run a docker subcommand, start Docker daemon.
If the Docker daemon is installed using the RPM package or system package management tool, you can run the systemctl start docker command to start the Docker daemon.
The docker command supports the following parameters:
To combine parameters of a single character, run the following command:
docker run -t -i busybox /bin/sh
The command can be written as follows:
docker run -ti busybox /bin/sh
bool command parameters such as --icc=true, are displayed in the command help. If this parameter is not used, the default value displayed in the command help is used. If this parameter is used, the opposite value of the value displayed in the command help is used. In addition, if --icc is not added when Docker daemon is started, --icc=true is used by default. Otherwise, --icc=false is used.
Parameters such as --attach=[] in the command help indicate that these parameters can be set for multiple times. For example:
docker run --attach=stdin --attach=stdout -i -t busybox /bin/sh
Parameters such as -a and --attach=[] in the command help indicate that the parameter can be specified using either -a value or --attach=value. For example:
docker run -a stdin --attach=stdout -i -t busybox /bin/sh
Parameters such as --name="" can be configured with a character string and can be configured only once. Parameters such as -c= can be configured with an integer and can be configured only once.
Table 1 Parameters specified during the Docker daemon startup
CORS header information for enabling remote API calling. This interface supports the secondary development of upper-layer applications, which sets the CORS header for a remote API. | |
Existing bridge device mounting to the docker container. Note: none can be used to disable the network in the container. | |
Bridge IP address, which is automatically created using the CIDR address. Note: this parameter cannot be used with -b . | |
Forcibly searches DNS search domain name used by a container. | |
Parameter to be executed when a container is started. For example, set the native.umask parameter. # The umask value of the started container is 0022.--exec-opt native.umask=normal \# The umask value of the started container is 0027 (default value). --exec-opt native.umask=secure Note: If native.umask is also configured in docker create or docker run command, the configuration in command is used. | |
Fixed IP address (for example, 10.20.0.0/16) of the subnet. The IP address of the subnet must belong to the network bridge. | |
Group assigned to the corresponding Unix socket in the background running mode. Note: When an empty string is configured for this parameter, the group information is removed. | |
Socket bound in background mode. One or more sockets can be configured using tcp://host:port, unix:///path to socket, fd://* or fd://socketfd. Example: | |
Registry for insecure connections. By default, the Docker uses TLS certificates to ensure security for all connections. If the registry does not support HTTPS connections or the certificate is issued by an unknown certificate authority of the Docker daemon, you need to configure --insecure-registry=192.168.1.110:5000 when starting the daemon. This parameter needs to be configured if a private registry is used. | |
Image layer integrity check. To enable the function, set this parameter to true. Otherwise, set this parameter to false. If this parameter is not configured, the function is disabled by default. When Docker is started, the image layer integrity is checked. If the image layer is damaged, the related images are unavailable. Docker cannot verify empty files, directories, or link files. Therefore, if the preceding files are lost due to a power failure, the integrity check of Docker image data may fail. When the Docker version changes, check whether the parameter is supported. If not supported, delete it from the configuration file. | |
Default IP address used when a container is bound to a port. | |
MTU value of the container network. If this parameter is not configured, value of route MTU is used by default. If the default route is not configured, set this parameter to the constant value 1500. | |
Enables SELinux. If the kernel version is 3.10.0-862.14 or later, this parameter cannot be set to true. | |
Storage driver parameter. This parameter is valid only when the storage driver is devicemapper. Example: dockerd --storage-opt dm.blocksize=512K | |
Certificate file path that has been authenticated by the CA. | |
Verifies the communication between the background processes and the client using TLS. | |
Whether to forcibly skip the verification of the certificate host or domain name. The default value is false. | |
Whether to use the userland proxy for the container LO device. | |