Skip to content
DocsTry Aspire
DocsTry

Service.addVolume

Method
📦 Aspire.Hosting.Docker v13.4.0
interface Service {
// ... omitted for brevity
addVolume(source: string, target: string, type?: string, isReadOnly?: boolean, configure?: (obj: Volume) => Promise<void>): Service;
}

Signature

methodaddVolume
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
sourcestring
targetstring
typestringoptional= volume
isReadOnlybooleanoptional
configure(obj: Volume) => Promise<void>optional
Service

Defined on

This method is defined on the following type: