Service.Networks Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines the collection of networks that the service is connected to.
This property specifies the names of the networks the service should be attached to.
Each entry in this list represents a network defined in the Docker Compose file or an
externally defined network. Connecting a service to one or more networks allows inter-service
communication across those networks, as well as communication with external systems configured
on those same networks.
If no network is specified, the service is connected to the default network that is automatically
created by Docker Compose for the project unless network_mode
is set to another value.
[YamlDotNet.Serialization.YamlMember(Alias="networks", DefaultValuesHandling=YamlDotNet.Serialization.DefaultValuesHandling.OmitEmptyCollections)]
public System.Collections.Generic.List<string> Networks { get; set; }
[<YamlDotNet.Serialization.YamlMember(Alias="networks", DefaultValuesHandling=YamlDotNet.Serialization.DefaultValuesHandling.OmitEmptyCollections)>]
member this.Networks : System.Collections.Generic.List<string> with get, set
Public Property Networks As List(Of String)
Property Value
- Attributes
-
YamlDotNet.Serialization.YamlMemberAttribute