May 22, 2021 Docker From entry to practice
Below is a list of commands related to the Docker network.
Some of these command options can only be configured when the Docker service starts and do not take effect immediately.
-b BRIDGE or --bridge=BRIDGE
-- specifies the bridge on which the container is mounted
--bip=CIDR
docker0 mask
-H SOCKET... or --host=SOCKET...
--The channel on which the Docker service side receives commands
--icc=true|false
does it support communication between containers?
--ip-forward=true|false
see the communication between the containers below
--iptables=true|false
-- Docker is prohibited from adding iptables rules
--mtu=BYTES
--MTU in the container network
The following two command options can be specified between when the service is started or when
docker run
starts.
Specifying when the Docker service starts becomes the default value, and the
docker run
when the docker run is performed later.
--dns=IP_ADDRESS...
--Use the specified DNS server
--dns-search=DOMAIN...
-- Specify the DNS search domain
Finally, these options are
docker run
is executed because it is specific to the container.
-h HOSTNAME or --hostname=HOSTNAME
-- configure the container host name
--link=CONTAINER_NAME:ALIAS
-- a connection added to another container
--net=bridge|none|container:NAME_or_ID|host
-- bridge mode for configuring containers
-p SPEC or --publish=SPEC
-- map container ports to host hosts
-P or --publish-all=true|false
-- maps all ports of the container to the host host