Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddJavaContainer

Method
📦 Aspire.Hosting.Java v17.0.0-preview.1.26565.2
func (DistributedApplicationBuilder) AddJavaContainer(
name string,
image string,
options ...*AddJavaContainerOptions,
) JavaContainerResource

Signature

methodAddJavaContainerbuilder
Adds a Java application that runs from an existing container image.
AddJavaContainer(
name string,
image string,
options ...*AddJavaContainerOptions,
) JavaContainerResource
namestringThe name of the resource.
imagestringThe container image that runs the application, for example mycompany/catalog.
options...*AddJavaContainerOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddJavaContainerOptions argument.

Tag*stringThe image tag. Defaults to the image's latest tag.
JavaContainerResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder