Watch Aspire live streamsDocsTry Aspire

addJavaContainer

Method
📦 Aspire.Hosting.Java v17.0.0-preview.1.26567.5
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addJavaContainer(
name: string,
image: string,
tag?: string): JavaContainerResource;
}

Signature

methodaddJavaContainerbuilder
Adds a Java application that runs from an existing container image.
addJavaContainer(
name: string,
image: string,
tag?: string): JavaContainerResource
namestringThe name of the resource.
imagestringThe container image that runs the application, for example `mycompany/catalog`.
tagstringoptionalThe image tag. Defaults to the image's `latest` tag.
JavaContainerResource

Applies to

This method applies to the following types: