Create Container
Description
Name
: Container nameImage
: The name of the image used to create the container, such as docker.io/helloworld:latestCommand
: The command running container, and if empty, use the predefined commands in DockerfileNetwork Mode
: Network mode,Host
(Direct use of the host network),Bridge
(Through the Docker network card to the host network),Customer
(To use a custom network, you need to specifyNetwork Name
)Network Name
: Set whenNetwork Mode
isCustomer
HostName
: Set whenNetwork Mode
is notHost
Restart Policy
: The restart policy when the container exits.always
means the container will always restart after exiting (except for the user to manually stop).on-failure
means only when the container does not normally exit will restart (exit code is not 0). Default isnone
which means does not restart.Max Retry Count
: WhenRestart Policy
ison-failure
, you need to specify the maximum number of retries
DNS
: The container needs to use the DNS serverCPU Shares
: Specifies the CPU usage weight for the current container relative to other containersMemory Limit
: Maximum available memoryPorts Binging
: WhenNetwork Mode
is notHost
, you can set port mappingVolumes Binding
: Container volume mappingEnvironment Variables
: Set container environment variables, such as “VAR=value”Links
: A link between containers, such as container_name:aliasLog Config
: Log configuration, there are two properties Driver and Opts. The default value is Driver:json-file,Opts:{max-size = 10m,max-file = 3}