Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

ContainerResource.withDockerfile

Method
📦 Aspire.Hosting v13.6.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

Defined on

This method is defined on the following type: