ComposeFile.AddNetwork
Method
type ComposeFile interface { // ... omitted for brevity AddNetwork( name string, options ...*AddNetworkOptions, ) ComposeFile}Signature
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().
Defined on
This method is defined on the following type: