Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

295
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda