# PublishAsAzureContainerApp

- Module: [Aspire.Hosting.Azure.AppContainers](/reference/api/go/aspire.hosting.azure.appcontainers.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: `ExecutableResource`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Publishes the specified container resource as a container app.

## Remarks

This method checks if the application is in publish mode. If it is, it adds the necessary infrastructure
for container apps and applies the provided configuration action to the container app.
```
builder.AddNpmApp("name", "image").PublishAsAzureContainerApp((infrastructure, app) =>
{
// Configure the container app here
});
```

## Definition

```go
func (ExecutableResource) PublishAsAzureContainerApp(configure func(arg1 AzureResourceInfrastructure, arg2 ContainerApp)) ExecutableResource
```

## Parameters

- `configure` (`func(arg1 AzureResourceInfrastructure, arg2 ContainerApp)`) -- The configuration action for the container app.

## Returns

`ExecutableResource` -- The updated container resource builder.

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

## Applies to

- `DotnetToolResource`
- `ExecutableResource`
