Skip to content
DocsTry Aspire
DocsTry

withDockerfile

Method
📦 Aspire.Hosting v13.4.0
interface ContainerResource {
// ... omitted for brevity
withDockerfile(
contextPath: string,
dockerfilePath?: string,
stage?: string): ContainerResource;
}

Signature

methodwithDockerfilebuilder
Causes Aspire to build the specified container image from a Dockerfile.
withDockerfile(
contextPath: string,
dockerfilePath?: string,
stage?: string): ContainerResource
contextPathstring
dockerfilePathstringoptional
stagestringoptional
ContainerResource

Applies to

This method applies to the following types: