Skip to content
DocsTry Aspire
DocsTry

DockerfileBuilder

Classnet8.0
📦 Aspire.Hosting v13.4.0
Builder for creating Dockerfiles programmatically.
namespace Aspire.Hosting.ApplicationModel.Docker;
public class DockerfileBuilder
{
// ...
}
View all constructors
Stagesget
Gets the stages in this Dockerfile.
View all properties
Arg(string)experimental
Adds a global ARG statement to define a build-time variable before any stages.
Arg(string, string)experimental
Adds a global ARG statement to define a build-time variable with a default value before any stages.
From(string, string)experimental
Adds a FROM statement to start a new named stage.
From(string)experimental
Adds a FROM statement to start a new stage.
WriteAsync(StreamWriter, CancellationToken)
Task
Writes the Dockerfile content to the specified IO.StreamWriter.
View all methods