Skip to content
Docs Try Aspire
Docs Try

addVolume

Method
📦 Aspire.Hosting.Docker v13.4.0
interface ComposeFile {
// ... omitted for brevity
addVolume(
name: string,
driver?: string,
external?: boolean,
configure?: callback): ComposeFile;
}

Signature

method addVolume
Adds a top-level volume definition to the Docker Compose file.
addVolume(name: string, driver?: string, external?: boolean, configure?: (obj: Volume) => Promise<void>): ComposeFile
name string
driver string optional
external boolean optional
configure (obj: Volume) => Promise<void> optional
ComposeFile

Applies to

This method applies to the following types: