Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithHostPort

Method
📦 Aspire.Hosting.Docker v17.0.0
func (DockerComposeAspireDashboardResource) WithHostPort(options ...*WithHostPortOptions) DockerComposeAspireDashboardResource

Signature

methodWithHostPortbuilder
Configures the port used to access the Aspire Dashboard from a browser.
WithHostPort(options ...*WithHostPortOptions) DockerComposeAspireDashboardResource
options...*WithHostPortOptionsOptional settings, described under Options.

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

Port*float64The 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

The resource builder.

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

Applies to

This method applies to the following types: