You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using [Kubernetes](https://kubernetes.io/docs/tutorials/services/connect-applications-service/) or [Docker Compose](https://docs.docker.com/compose/compose-file/05-services/#ports), you will need to change the port per those schemas. See [Using .NET with Kubernetes](https://github.com/dotnet/dotnet-docker/blob/main/samples/kubernetes/README.md) for examples.
70
-
71
69
## Version introduced
72
70
73
71
.NET 8 Preview 1
@@ -84,10 +82,18 @@ The change to the port number was made because of the need to provide a good usa
84
82
85
83
There are two ways to respond to this breaking change:
86
84
87
-
- Recommended: Explicitly set the `ASPNETCORE_HTTP_PORTS`, `ASPNETCORE_HTTPS_PORTS`, and `ASPNETCORE_URLS` environment variables to the desired port. Example: `docker run --rm -it -p 9999:80 -e ASPNETCORE_HTTP_PORTS=80 <my-app>`
88
-
- Update existing commands and configuration that rely on the expected default port of port 80 to reference port 8080 instead. Example: `docker run --rm -it -p 9999:8080 <my-app>`
85
+
- (Recommended action) Explicitly set the `ASPNETCORE_HTTP_PORTS`, `ASPNETCORE_HTTPS_PORTS`, and `ASPNETCORE_URLS` environment variables to the desired port. Example: `docker run --rm -it -p 8000:80 -e ASPNETCORE_HTTP_PORTS=80 <my-app>`
86
+
- Update existing commands and configuration that rely on the expected default port of port 80 to reference port 8080 instead. Example: `docker run --rm -it -p 8000:8080 <my-app>`
87
+
88
+
If your app was built using the older <xref:Microsoft.AspNetCore.WebHost.CreateDefaultBuilder?displayProperty=nameWithType> method, set `ASPNETCORE_URLS` (not `ASPNETCORE_HTTP_PORTS`). Example: `docker run --rm -it -p 8000:80 -e ASPNETCORE_URLS=http://*:80 <my-app>`.
89
+
90
+
If you're using [Kubernetes](https://kubernetes.io/docs/tutorials/services/connect-applications-service/) or [Docker Compose](https://docs.docker.com/compose/compose-file/05-services/#ports), you need to change the port per those schemas. For examples, see [Using .NET with Kubernetes](https://github.com/dotnet/dotnet-docker/blob/main/samples/kubernetes/README.md).
91
+
92
+
If you use Azure container services to host your ASP.NET Core container app, you need to update your container environment to set the desired port:
89
93
90
-
If your app was built using the older <xref:Microsoft.AspNetCore.WebHost.CreateDefaultBuilder?displayProperty=nameWithType> method, set `ASPNETCORE_URLS` (not `ASPNETCORE_HTTP_PORTS`). Example: `docker run --rm -it -p 9999:80 -e ASPNETCORE_URLS=http://*:80 <my-app>`
94
+
- For Azure App Service, set `WEBSITES_PORT`[using the CLI](/azure/app-service/configure-custom-container?tabs=debian&pivots=container-linux#configure-port-number) or in the portal.
95
+
- For Azure Container Apps, you can change the port as part of [resource creation](/azure/container-apps/get-started-existing-container-image-portal?pivots=container-apps-public-registry#application-ingress-settings).
96
+
- For Azure Container Instances, you can change the port as part of [resource creation](/azure/container-instances/container-instances-quickstart-portal#create-a-container-instance).
0 commit comments