Share via

How to use .NET 9 in Container Apps?

Mikita 0 Reputation points
2024-11-19T16:56:43.34+00:00

After the migration from .NET 8 to .NET 9 deployment is failing. I'm using direct deployment from Github without Docker.
Is it possible to use .NET 9 in the Container Apps?

Developer technologies | .NET | Other
0 comments No comments

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 83,981 Reputation points
    2025-01-07T21:28:28.8533333+00:00

    you are using a GitHub action to deploy a docker container image to azure container registry . but the container build, which is totally unrelated to the container hosting environment is failing.

    you are pulling a base image that support python and node js. as both these platform run source code directly, no additional build step is required, just copy source to container and deploy to registry.

    but you are trying to deploy a .net 9 application. this means you need a complied source, and a container that has asp.net runtime support to copy to. say:

    mcr.microsoft.com/dotnet/aspnet:9.0

    if you don't have a compiled source, then you use multiple containers. a build container with the sdk like:

    https://hub.docker.com/r/microsoft/dotnet-sdk

    see build a docker container:

    https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/docker/building-net-docker-images?view=aspnetcore-9.0

    then in the yaml file specify the dockerfilePath to do the build:

    dockerfilePath

    Was this answer helpful?

    0 comments No comments

  2. Bruce (SqlWork.com) 83,981 Reputation points
    2024-11-19T17:52:40.7266667+00:00

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.