AddService
Method
func (ComposeFile) AddService( name string, options ...*AddServiceOptions,) ComposeFileSignature
method
AddService Adds a service definition to the Docker Compose file.
AddService( name string, options ...*AddServiceOptions,) ComposeFileParameters
namestringThe name of the service.options...*AddServiceOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*AddServiceOptions argument.
Image*stringThe container image to use for the service.Configurefunc(obj Service) callbackAn optional callback for further service 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: