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

Docker run fails when project is published using aspnet:7.0-alpine base image #266

Closed
rscarborough1996 opened this issue Dec 2, 2022 · 1 comment

Comments

@rscarborough1996
Copy link

Docker run fails with the following error:

$ docker run -it -p 8080:80 my-awesome-container-app:1.0.0
exec /app/my-awesome-container-app: no such file or directory

Reproduction steps:

# create a new project and move to its directory
dotnet new mvc -n my-awesome-container-app
cd my-awesome-container-app

# add a reference to a (temporary) package that creates the container
dotnet add package Microsoft.NET.Build.Containers

# publish your project
dotnet publish --os linux --arch x64 -c Release -p:PublishProfile=DefaultContainer -p:ContainerBaseImage=mcr.microsoft.com/dotnet/aspnet:7.0-alpine

# run it
docker run -it -p 8080:80 my-awesome-container-app:1.0.0

Works just fine when I switched to aspnet:7.0-jammy

@baronfel
Copy link
Member

Thanks for this, and sorry it took so long to see it. We rediscovered this today and reported some specific details in #301, please see that issue for workarounds until we get this solved for real.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants