AddNetwork
Method
func (ComposeFile) AddNetwork( name string, options ...*AddNetworkOptions,) ComposeFileSignature
method
AddNetwork Adds a top-level network definition to the Docker Compose file.
AddNetwork( name string, options ...*AddNetworkOptions,) ComposeFileParameters
namestringThe name of the network.options...*AddNetworkOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*AddNetworkOptions argument.
Driver*stringThe network driver to use.External*boolA value indicating whether the network is managed outside the generated Compose file.Configurefunc(obj Network) callbackAn optional callback for further network customization.Returns
ComposeFile The updated Docker Compose file.
Returns a handle; failures surface later via Err().
Applies to
This method applies to the following types: