Skip to content
Docs Try Aspire
Docs Try

addVolume

Method
📦 Aspire.Hosting.Docker v13.4.0
interface Service {
// ... omitted for brevity
addVolume(
source: string,
target: string,
type?: string,
isReadOnly?: boolean,
configure?: callback): Service;
}

Signature

method addVolume
Adds a volume mount to a generated Docker Compose service.
addVolume(source: string, target: string, type?: string, isReadOnly?: boolean, configure?: (obj: Volume) => Promise<void>): Service
source string
target string
type string optional = volume
isReadOnly boolean optional
configure (obj: Volume) => Promise<void> optional
Service

Applies to

This method applies to the following types: