DockerComposeAspireDashboardResourceBuilderExtensions.WithHostPort Method         
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures the port used to access the Aspire Dashboard from a browser.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Docker.DockerComposeAspireDashboardResource> WithHostPort(this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Docker.DockerComposeAspireDashboardResource> builder, int? port = default);static member WithHostPort : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Docker.DockerComposeAspireDashboardResource> * Nullable<int> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Docker.DockerComposeAspireDashboardResource><Extension()>
Public Function WithHostPort (builder As IResourceBuilder(Of DockerComposeAspireDashboardResource), Optional port As Nullable(Of Integer) = Nothing) As IResourceBuilder(Of DockerComposeAspireDashboardResource)Parameters
The IResourceBuilder<T> instance to configure.
The 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.
Returns
The IResourceBuilder<T> instance for chaining.