Watch Aspire live streamsDocsTry Aspire

DockerComposeAspireDashboardResource.withHostPort

Method
📦 Aspire.Hosting.Docker v13.6.5
interface DockerComposeAspireDashboardResource {
// ... omitted for brevity
withHostPort(port?: number): DockerComposeAspireDashboardResource;
}

Signature

methodwithHostPortbuilder
Configures the port used to access the Aspire Dashboard from a browser.
withHostPort(port?: number): DockerComposeAspireDashboardResource
portnumberoptionalThe port to bind on the host. If non-null, the dashboard will be exposed on the host. If `null`, the dashboard will not be exposed on the host but will only be reachable within the container network.
DockerComposeAspireDashboardResource

Defined on

This method is defined on the following type: