ContainerResourceBuilderExtensions Class

Definition

Provides extension methods for IDistributedApplicationBuilder to add container resources to the application.

public static class ContainerResourceBuilderExtensions
type ContainerResourceBuilderExtensions = class
Public Module ContainerResourceBuilderExtensions
Inheritance
ContainerResourceBuilderExtensions

Methods

AddContainer(IDistributedApplicationBuilder, String, String)

Adds a container resource to the application. Uses the "latest" tag.

AddContainer(IDistributedApplicationBuilder, String, String, String)

Adds a container resource to the application.

AddDockerfile(IDistributedApplicationBuilder, String, String, String, String)

Adds a Dockerfile to the application model that can be treated like a container resource.

PublishAsContainer<T>(IResourceBuilder<T>)

Changes the resource to be published as a container in the manifest.

WithBindMount<T>(IResourceBuilder<T>, String, String, Boolean)

Adds a bind mount to a container resource.

WithBuildArg<T>(IResourceBuilder<T>, String, IResourceBuilder<ParameterResource>)

Adds a build argument when the container is built from a Dockerfile.

WithBuildArg<T>(IResourceBuilder<T>, String, Object)

Adds a build argument when the container is build from a Dockerfile.

WithBuildSecret<T>(IResourceBuilder<T>, String, IResourceBuilder<ParameterResource>)

Adds a secret build argument when the container is built from a Dockerfile.

WithContainerRuntimeArgs<T>(IResourceBuilder<T>, Action<ContainerRuntimeArgsCallbackContext>)

Adds a callback to be executed with a list of arguments to add to the container runtime run command when a container resource is started.

WithContainerRuntimeArgs<T>(IResourceBuilder<T>, Func<ContainerRuntimeArgsCallbackContext,Task>)

Adds a callback to be executed with a list of arguments to add to the container runtime run command when a container resource is started.

WithContainerRuntimeArgs<T>(IResourceBuilder<T>, String[])

Adds a callback to be executed with a list of arguments to add to the container runtime run command when a container resource is started.

WithDockerfile<T>(IResourceBuilder<T>, String, String, String)

Causes .NET Aspire to build the specified container image from a Dockerfile.

WithEntrypoint<T>(IResourceBuilder<T>, String)

Sets the Entrypoint for the container.

WithImage<T>(IResourceBuilder<T>, String, String)

Allows overriding the image on a container.

WithImageRegistry<T>(IResourceBuilder<T>, String)

Allows overriding the image registry on a container.

WithImageSHA256<T>(IResourceBuilder<T>, String)

Allows setting the image to a specific sha256 on a container.

WithImageTag<T>(IResourceBuilder<T>, String)

Allows overriding the image tag on a container.

WithVolume<T>(IResourceBuilder<T>, String)

Adds an anonymous volume to a container resource.

WithVolume<T>(IResourceBuilder<T>, String, String, Boolean)

Adds a volume to a container resource.

Applies to