Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet: Support dotnet publish to produce container image #4573

Merged
merged 1 commit into from
Nov 22, 2024

Commits on Nov 22, 2024

  1. dotnet: Support dotnet publish to produce container image

    The `dotnet` tool has native support for producing (and pushing) a
    container image. This does not require a local docker daemon and in
    general "does the right thing" and is the prefered way for .NET
    customers to produce container
    images. https://learn.microsoft.com/dotnet/core/docker/publish-as-container
    gives a good overview of how this support works and we've been using
    it to build and push container images for Aspire apps.
    
    This change updates things such that we can use this support when
    building a non Aspire based .NET app. If a `Dockerfile` exists, we
    respect it, but otherwise instead of trying to use Oryx to produce a
    container image, we will use `dotnet publish`.
    
    In addition, we now use 8080 as the default port of a `dotnet` based
    application (with no Dockerfile) as that's the default port used by
    the standard ASP.NET base image.
    
    A new recorded test was added - it builds on top of the existing
    `containerapp` sample, and the test aranges to remove the `Dockerfile`
    file from the template before running `up`.
    
    Fixes Azure#2632
    Fixes Azure#4583
    ellismg committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    b7366f0 View commit details
    Browse the repository at this point in the history