IDistributedApplicationBuilder.addDockerfileFactory

Method
📦 Aspire.Hosting v17.0.0
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addDockerfileFactory(name: string, contextPath: string, dockerfileFactory: (arg: DockerfileFactoryContext) => Promise<string>, stage?: string): ContainerResource;
}

Signature

methodaddDockerfileFactorybuilder
Adds a Dockerfile to the application model that can be treated like a container resource, with the Dockerfile content generated by an asynchronous factory function.
addDockerfileFactory(name: string, contextPath: string, dockerfileFactory: (arg: DockerfileFactoryContext) => Promise<string>, stage?: string): ContainerResource
namestringThe name of the resource.
contextPathstringPath to be used as the context for the container image build.
dockerfileFactory(arg: DockerfileFactoryContext) => Promise<string>An asynchronous function that returns the Dockerfile content as a string.
stagestringoptionalThe stage representing the image to be published in a multi-stage Dockerfile.
ContainerResource

Defined on

This method is defined on the following type: