Volume
Handle
Represents a volume definition in a Docker Compose configuration file.
type Volume interface{}9 members
Properties
property
Driver*stringget · setGets or sets the name of the driver used for the volume. The driver is responsible for managing the volume and its storage backend.
Driver() (*string, error)SetDriver(value *string) Volumeproperty
DriverOpts *Dict[string, string] get · setRepresents a collection of driver-specific options for the volume. These options are passed as key-value pairs to the volume driver, allowing customization or configuration specific to the driver being used.
DriverOpts() *Dict[string, string]SetDriverOpts(value *Dict[string, string]) Volumeproperty
External*boolget · setIndicates whether the volume is external to the current scope or environment. A value of
true specifies that the volume is managed outside the scope of the current application or configuration. A value of false, or a null value, indicates that the volume is managed internally or by default behavior.External() (*bool, error)SetExternal(value *bool) Volumeproperty
Labels*Dict[string, string] get · setGets or sets a dictionary of labels associated with the volume. Labels are key-value pairs that can be used for metadata purposes or for organizing and identifying volumes within Docker services.
Labels() *Dict[string, string]SetLabels(value *Dict[string, string]) Volumeproperty
Namestringget · setGets or sets the name of the Docker Compose member.
Name() (string, error)SetName(value string) Volumeproperty
ReadOnly *boolget · setGets or sets a value indicating whether the volume is mounted as read-only.
ReadOnly() (*bool, error)SetReadOnly(value *bool) Volumeproperty
Source*stringget · setGets or sets the source property of the volume. The source defines the location on the host system or the specific resource from which the volume is sourced.
Source() (*string, error)SetSource(value *string) Volumeproperty
Target*stringget · setGets or sets the target path inside the container where the volume is mounted. This specifies the container location for the volume's data.
Target() (*string, error)SetTarget(value *string) Volumeproperty
Type*stringget · setGets or sets the type of volume. This specifies the method of volume provisioning such as bind mounts, named volumes, or other supported volume types in Docker.
Type() (*string, error)SetType(value *string) Volume