Base solution for your next web application
Open Closed

Docker in .net 8 #12146


User avatar
0
aiqbal created

Hi,

I'm trying to run the "ASP.NET CORE & Angular" version of the project within Docker but it's failing because the project is running in .Net 8 but the DockerFile references .Net 7.

I was able to get further by manually updating the DockerFile to reference .Net 8 instead which will start the project, but then I had trouble accessing it. I believe the issue is because the project is starting on port 5000 now instead of 80/443 like before. The only way I could get access to it was if I used the Kestrel override and specified the ports manually. That works but doesn't seem like the intended way. Do you know how this should be configured going forward in .net 8?

Marco


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team
  • User Avatar
    0
    aiqbal created

    Hi,

    I took a look at the documentation which shows how to create the images, but what I am trying to do is run the project using VisualStudio inside of Docker. When you do this it uses the Dockerfile in the project which has a base using aspnet:8.0.

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @aiqbal,

    Please look for this document. https://docs.aspnetzero.com/aspnet-core-mvc/latest/Development-Mvc-Core-Docker

    ASP.NET Zero aspnet-core folder contains various docker projects for your application to debug using docker containers. You can add these projects to your .Web or .All solutions by Add Existing Project to your preferred solution.