79473757

Date: 2025-02-27 19:41:16
Score: 0.5
Natty:
Report link

The reason the container didn't start is because in .NET 8, the container default port changed to 8080. I had to add PORT=8080 in Azure environment variables. After that, everything worked fine.

What's new in containers for .NET 8? The default port also changed from port 80 to 8080. To support this change, a new environment variable ASPNETCORE_HTTP_PORTS is available to make it easier to change ports. The variable accepts a list of ports, which is simpler than the format required by ASPNETCORE_URLS. If you change the port back to port 80 using one of these variables, you can't run as non-root.

Source: https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8/containers

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Nathan van Jole