Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

293
Views
Can't connect to ASP.NET core through docker

Hi people have been looking at this for far too long and need some help.

I have made a ASP.NET core website nothing fancy just the template that goes with VS 2017 (v 1.1). I publish the site using dotnet core cli and build an image using this dockerfile:

FROM microsoft/dotnet:1.1-runtime
COPY /Publish /dotnetapp
WORKDIR /dotnetapp

EXPOSE 8444
ENTRYPOINT ["dotnet", "Inqu.dll"]

When i run the image created with:

docker run -it <image_name:tag> -p 8444:8444

The image starts up waiting for request:

Hosting environment: Production
Content root path: /dotnetapp
Now listening on: http://*:8444
Application started. Press Ctrl+C to shut down.

but i can't reach the site and getting an ERR_CONNECTION_REFUSED when trying to access the site thought http://local-ip:8444/

I have modified the WebHostBuild to:

        var host = new WebHostBuilder()
            .UseKestrel()
            .UseUrls("http://*:8444")
            .UseContentRoot(Directory.GetCurrentDirectory())
            .UseStartup<Startup>()
            .UseApplicationInsights()
            .Build();

        host.Run();

So it should listen to port 8444, I have also tried to set:

ENV ASPNETCORE_URLS http://*:8444

in the Dockerfile but it doesnt help.


I have some other images in docker up and running (gogs and mysql) and i can access them with my local ip:port with no problems, but i can't connect to the kestrel server.

Can somebody please help me out?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Was a stupid mistake arguments were in wrong order

docker run -it -p 8444:8444 <image_name:tag>

and it worked :\

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!