Skip to content

Publish NativeAOT on Ubuntu doesn't work with -r linux-musl-x64 #92294

@eerhardt

Description

@eerhardt

Description

If someone tries to publish for NativeAOT from Ubuntu to Alpine, the publish "works", but the app doesn't run.

Reproduction Steps

On an Ubuntu machine:

  1. dotnet new webapiaot
  2. dotnet publish -t:PublishContainer -r linux-musl-x64 -p:ContainerBaseImage=alpine:latest

try to run your new alpine container, and it fails to run:

exec /app/myapp: no such file or directory

Expected behavior

I would expect either:

  1. The app should work
    -or-
  2. I get a publish error that this isn't supported

Actual behavior

I don't get an error. And the app doesn't work.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

cc @baronfel @agocke @MichalStrehovsky @richlander

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions