DistributedApplicationBuilder.AddDockerfileFactory
Method
type DistributedApplicationBuilder interface { // ... omitted for brevity AddDockerfileFactory( name string, contextPath string, dockerfileFactory func(arg DockerfileFactoryContext) string, options ...*AddDockerfileFactoryOptions, ) ContainerResource}Signature
method
AddDockerfileFactory builderAdds 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 func(arg DockerfileFactoryContext) string, options ...*AddDockerfileFactoryOptions,) ContainerResourceParameters
namestringThe name of the resource.contextPath stringPath to be used as the context for the container image build.dockerfileFactory func(arg DockerfileFactoryContext) string callbackAn asynchronous function that returns the Dockerfile content as a string.options...*AddDockerfileFactoryOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*AddDockerfileFactoryOptions argument.
Stage*stringThe stage representing the image to be published in a multi-stage Dockerfile.Returns
ContainerResource The resource builder.
Returns a handle; failures surface later via Err().
Defined on
This method is defined on the following type: