withDockerfile
Method
interface ContainerResource { // ... omitted for brevity withDockerfile( contextPath: string, dockerfilePath?: string, stage?: string): ContainerResource;}Signature
method
withDockerfile builderCauses Aspire to build the specified container image from a Dockerfile.
withDockerfile( contextPath: string, dockerfilePath?: string, stage?: string): ContainerResourceParameters
contextPath stringPath to be used as the context for the container image build.dockerfilePath stringoptionalPath to the Dockerfile relative to the `contextPath`. Defaults to "Dockerfile" if not specified.stagestringoptionalThe stage representing the image to be published in a multi-stage Dockerfile.Returns
ContainerResource Applies to
This method applies to the following types: