Skip to content
Docs Try Aspire

ContainerResource

Handle TypeScript
📦 Aspire.Hosting.Azure.AppConfiguration v13.2.0-preview.1.26159.1
interface ContainerResource
extends IComputeResource,
IResource,
IResourceWithArgs,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport {
publishAsConnectionString(): ContainerResource;
publishAsContainer(): ContainerResource;
withBindMount(
source: string,
target: string,
isReadOnly?: boolean): ContainerResource;
withBuildArg(
name: string,
value: ParameterResource): ContainerResource;
withBuildSecret(
name: string,
value: ParameterResource): ContainerResource;
withContainerName(name: string): ContainerResource;
withContainerNetworkAlias(alias: string): ContainerResource;
withContainerRuntimeArgs(args: string[]): ContainerResource;
withDockerfile(
contextPath: string,
dockerfilePath?: string,
stage?: string): ContainerResource;
withEndpointProxySupport(proxyEnabled: boolean): ContainerResource;
withEntrypoint(entrypoint: string): ContainerResource;
withImage(
image: string,
tag?: string): ContainerResource;
withImagePullPolicy(pullPolicy: ImagePullPolicy): ContainerResource;
withImageRegistry(registry: string): ContainerResource;
withImageSHA256(sha256: string): ContainerResource;
withImageTag(tag: string): ContainerResource;
withLifetime(lifetime: ContainerLifetime): ContainerResource;
withVolume(
target: string,
name?: string,
isReadOnly?: boolean): ContainerResource;
}

Methods

method publishAsConnectionString builder
Publishes the resource as a connection string
publishAsConnectionString(): ContainerResource
ContainerResource
method publishAsContainer builder
Configures the resource to be published as a container
publishAsContainer(): ContainerResource
ContainerResource
method withBindMount builder
Adds a bind mount
withBindMount(
source: string,
target: string,
isReadOnly?: boolean): ContainerResource
source string
target string
isReadOnly boolean optional = False
ContainerResource
method withBuildArg builder
Adds a build argument from a parameter resource
withBuildArg(
name: string,
value: ParameterResource): ContainerResource
name string
value ParameterResource
ContainerResource
method withBuildSecret builder
Adds a build secret from a parameter resource
withBuildSecret(
name: string,
value: ParameterResource): ContainerResource
name string
value ParameterResource
ContainerResource
method withContainerName builder
Sets the container name
withContainerName(name: string): ContainerResource
name string
ContainerResource
method withContainerNetworkAlias builder
Adds a network alias for the container
withContainerNetworkAlias(alias: string): ContainerResource
alias string
ContainerResource
method withContainerRuntimeArgs builder
Adds runtime arguments for the container
withContainerRuntimeArgs(args: string[]): ContainerResource
args string[]
ContainerResource
method withDockerfile builder
Configures the resource to use a Dockerfile
withDockerfile(
contextPath: string,
dockerfilePath?: string,
stage?: string): ContainerResource
contextPath string
dockerfilePath string optional
stage string optional
ContainerResource
method withEndpointProxySupport builder
Configures endpoint proxy support
withEndpointProxySupport(proxyEnabled: boolean): ContainerResource
proxyEnabled boolean
ContainerResource
method withEntrypoint builder
Sets the container entrypoint
withEntrypoint(entrypoint: string): ContainerResource
entrypoint string
ContainerResource
method withImage builder
Sets the container image
withImage(
image: string,
tag?: string): ContainerResource
image string
tag string optional
ContainerResource
method withImagePullPolicy builder
Sets the container image pull policy
withImagePullPolicy(pullPolicy: ImagePullPolicy): ContainerResource
pullPolicy ImagePullPolicy
ContainerResource
method withImageRegistry builder
Sets the container image registry
withImageRegistry(registry: string): ContainerResource
registry string
ContainerResource
method withImageSHA256 builder
Sets the image SHA256 digest
withImageSHA256(sha256: string): ContainerResource
sha256 string
ContainerResource
method withImageTag builder
Sets the container image tag
withImageTag(tag: string): ContainerResource
tag string
ContainerResource
method withLifetime builder
Sets the lifetime behavior of the container resource
withLifetime(lifetime: ContainerLifetime): ContainerResource
lifetime ContainerLifetime
ContainerResource
method withVolume builder
Adds a volume
withVolume(
target: string,
name?: string,
isReadOnly?: boolean): ContainerResource
target string
name string optional
isReadOnly boolean optional = False
ContainerResource