# AdminerContainerResource.WithHostPort

- Module: [CommunityToolkit.Aspire.Hosting.Adminer](/reference/api/go/communitytoolkit.aspire.hosting.adminer.md)
- Defined on: [AdminerContainerResource](/reference/api/go/communitytoolkit.aspire.hosting.adminer/adminercontainerresource.md)
- Version: `13.6.1`
- Kind: `method`

Configures the host port that the Adminer resource is exposed on instead of using randomly assigned port.

## Definition

```go
type AdminerContainerResource interface {
    // ... omitted for brevity
    WithHostPort(port *float64) AdminerContainerResource
}
```

## Signature

```go
WithHostPort(port *float64) AdminerContainerResource
```

## Parameters

- `port` (`*float64`) -- The port to bind on the host. If `null` is used random port will be assigned.

## Returns

[`AdminerContainerResource`](/reference/api/go/communitytoolkit.aspire.hosting.adminer/adminercontainerresource.md) -- The resource builder for Adminer.

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

## Defined on

- [AdminerContainerResource](/reference/api/go/communitytoolkit.aspire.hosting.adminer/adminercontainerresource.md) -- `handle`
