Volume Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a volume definition in a Docker Compose configuration file.
[YamlDotNet.Serialization.YamlSerializable]
public sealed class Volume : Aspire.Hosting.Docker.Resources.ComposeNodes.NamedComposeMember
[<YamlDotNet.Serialization.YamlSerializable>]
type Volume = class
inherit NamedComposeMember
Public NotInheritable Class Volume
Inherits NamedComposeMember
- Inheritance
- Attributes
-
YamlDotNet.Serialization.YamlSerializableAttribute
Remarks
The Volume class is used to define properties and options for volumes in a Docker environment. Volumes are used to persist data beyond the lifecycle of a container and can be shared among multiple containers.
Constructors
Volume() |
Properties
Driver |
Gets or sets the name of the driver used for the volume. The driver is responsible for managing the volume and its storage backend. |
DriverOpts |
Represents 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. |
External |
Indicates whether the volume is external to the current scope or environment.
A value of |
Labels |
Gets 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. |
Name |
Gets or sets the name of the Docker Compose member. (Inherited from NamedComposeMember) |
ReadOnly |
Gets or sets a value indicating whether the volume is mounted as read-only. |
Source |
Gets 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. |
Target |
Gets or sets the target path inside the container where the volume is mounted. This specifies the container ___location for the volume's data. |
Type |
Gets 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. |