withVolume

Method
📦 Aspire.Hosting v17.0.0
interface ContainerResource {
// ... omitted for brevity
withVolume(
target: string,
name?: string,
isReadOnly?: boolean): ContainerResource;
}

Signature

methodwithVolumebuilder
Adds a volume to a container resource.
withVolume(
target: string,
name?: string,
isReadOnly?: boolean): ContainerResource
targetstringThe mount path inside the container.
namestringoptionalThe volume name. If null, an anonymous volume is created.
isReadOnlybooleanoptional= FalseWhether the volume is read-only.
ContainerResource

Applies to

This method applies to the following types: