AddVolume
Method
func (ComposeFile) AddVolume( name string, options ...*AddVolumeOptions,) ComposeFileSignature
method
AddVolume Adds a top-level volume definition to the Docker Compose file.
AddVolume( name string, options ...*AddVolumeOptions,) ComposeFileParameters
namestringThe name of the volume.options...*AddVolumeOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*AddVolumeOptions argument.
Driver*stringThe volume driver to use.External*boolA value indicating whether the volume is managed outside the generated Compose file.Configurefunc(obj Volume) callbackAn optional callback for further volume 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: