Skip to content
Docs Try Aspire

DockerfileBuildAnnotation Properties

Class Properties 9 members
Represents an annotation for customizing a Dockerfile build.
BuildArguments Section titled BuildArguments Dictionary<string, object?>
Gets the arguments to pass to the build.
public Dictionary<string, object?> BuildArguments { get; }
BuildSecrets Section titled BuildSecrets Dictionary<string, object>
Gets the secrets to pass to the build.
public Dictionary<string, object> BuildSecrets { get; }
ContextPath Section titled ContextPath string
Gets the path to the context directory for the build.
public string ContextPath { get; }
DockerfileFactory Section titled DockerfileFactory nullable Func<DockerfileFactoryContext, Task<string>>
Gets or sets the factory function that generates Dockerfile content dynamically. When set, this factory will be invoked to generate the Dockerfile content at build time, and the content will be written to a generated file path.
public Func<DockerfileFactoryContext, Task<string>>? DockerfileFactory { get; init; }
DockerfilePath Section titled DockerfilePath string
Gets the path to the Dockerfile to use for the build.
public string DockerfilePath { get; }
Gets or sets a value indicating whether an entry point is defined in the Dockerfile.
public bool HasEntrypoint { get; set; }
Container images without an entry point are not considered compute resources.
ImageName Section titled ImageName nullable string?
Gets or sets the image name for the generated container image. When set, this will be used as the container image name instead of the value from ContainerImageAnnotation.
public string? ImageName { get; set; }
ImageTag Section titled ImageTag nullable string?
Gets or sets the image tag for the generated container image. When set, this will be used as the container image tag instead of the value from ContainerImageAnnotation.
public string? ImageTag { get; set; }
Stage Section titled Stage nullable string?
Gets the name of the build stage to use for the build.
public string? Stage { get; }