Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

294
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda