Network
Handle
Represents a Docker network configuration as part of a Compose file.
type Network interface{}8 members
Properties
property
Attachable*boolget · setGets or sets a value indicating whether the network is attachable. When this property is set to true, containers can dynamically attach to the network at runtime. This feature is primarily used in Docker Swarm mode to enable service discovery and communication between services.
Attachable() (*bool, error)SetAttachable(value *bool) Networkproperty
Driver*stringget · setGets or sets the driver used for the network. The driver determines the networking implementation that the container network is based on. Examples include bridge, overlay, host, etc.
Driver() (*string, error)SetDriver(value *string) Networkproperty
DriverOpts *Dict[string, string] get · setRepresents a dictionary of driver-specific options for the network configuration in a Docker service node.
DriverOpts() *Dict[string, string]SetDriverOpts(value *Dict[string, string]) Networkproperty
External*boolget · setIndicates whether the network is external or managed by Docker outside of the application stack. When set to true, the network is assumed to be pre-existing and not defined by the application's configuration. When set to false or null, the network can be defined and created within the application scope.
External() (*bool, error)SetExternal(value *bool) Networkproperty
Ingress*boolget · setRepresents whether the network is configured as an ingress network. An ingress network is used to manage the internal routing and load balancing for swarm services in Docker.
Ingress() (*bool, error)SetIngress(value *bool) Networkproperty
Internal*boolget · setDetermines if the network is restricted to internal usage only. When set to true, the network is not accessible externally.
Internal() (*bool, error)SetInternal(value *bool) Networkproperty
Labels*Dict[string, string] get · setRepresents a collection of metadata labels applied to the network configuration. These labels can be used to organize, manage, or identify network resources.
Labels() *Dict[string, string]SetLabels(value *Dict[string, string]) Networkproperty
Namestringget · setGets or sets the name of the Docker Compose member.
Name() (string, error)SetName(value string) Network