Skip to content

What's the best choice for a non-root port for ASP.NET Core? #43149

@richlander

Description

@richlander

We're looking at supporting non-root container images. See: dotnet/dotnet-docker#3968

We're part way down this path already: https://github.com/dotnet/dotnet-docker/blob/2aeeffadbf4f31c062ba20d46efb4782d62e9a43/src/runtime-deps/6.0/cbl-mariner2.0-distroless/amd64/Dockerfile#L52

We've chosen port 8080 so far. That's a reasonable choice. We want to make a long-term decision on our default non-root port.

The leading contenders for HTTP and HTTPS are:

  • 5000 and 5001
  • 8080 and 8081

I have a bias to the 500x option since its what ASP.NET Core uses by default for localhost dev.

The request for this info is coming from the .NET container team. We feel like the ASP.NET Core team should (A) make this decision, and (B) ensure it remains a good decision long-term.

@mthalman @MichaelSimons @jander-msft @bradygaster @LadyNaggaga @davidfowl @glennc

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsdesign-proposalThis issue represents a design proposal for a different issue, linked in the descriptiondocker

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions