Skip to content
Docs Try Aspire
Docs Try

addDockerfileFactory

Method
📦 Aspire.Hosting v13.4.0
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addDockerfileFactory(
name: string,
contextPath: string,
dockerfileFactory: callback,
stage?: string): ContainerResource;
}

Signature

method addDockerfileFactory builder
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
name string
contextPath string
dockerfileFactory (arg: DockerfileFactoryContext) => Promise<string>
stage string optional
ContainerResource

Applies to

This method applies to the following types: