If i try and go to http://localhost:4000 then I get a ERR_EMPTY_RESPONSE error page, and if I try to curl this I get a curl: (52) Empty reply from server
If I docker exec -it umbraco10 /bin/bash into the running container and try execute the same entrypoint.sh file created by the Dockerfile, I get this error:
Unhandled exception. System.IO.IOException: Failed to bind to address http://127.0.0.1:4000: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
---> System.Net.Sockets.SocketException (98): Address already in use
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
So it seems to be runnning. I have a suspicion that it has to do with https and ssl, and another port or maybe 0.0.0.0 vs 127.0.0.1, but can figure it out. Hope you can help me :)
Ehm. Where? Inside the Docker container? :) Im not sure this is answering the right question, or is it just me? I was wondering what I did wrong, and why I could see the published version of my newly installed Umbraco inside af docker container. I can make it work in both debug and release mode on my machine :)
We're running U10 in docker containers in Azure and we use the following syntax to set the correct urls. There are a few ways to do it and what works in one environment might not work in another.. Just a heads up if you run into problems in production. Also see https://andrewlock.net/5-ways-to-set-the-urls-for-an-aspnetcore-app/ !
Umbraco v10 + Docker
Hi
I've been struggling with setting up umbraco 10 with Docker, so I was hoping you could push me in the right direction.
I have created a brand new Umbraco with the newest dotnet sdk installed on mac.
And then I can publish it by doing
And then I can go to
http://localhost:5000
and install my Umbraco. So far so good. And if in my appsettings.json file add:I am able to change to port listening to 4000 instead of 5000.
Cool. Now I want to put it into Docker. I have created this Dockerfile.
And then I build and run the docker with this:
If i try and go to http://localhost:4000 then I get a
ERR_EMPTY_RESPONSE
error page, and if I try to curl this I get acurl: (52) Empty reply from server
If I
docker exec -it umbraco10 /bin/bash
into the running container and try execute the same entrypoint.sh file created by the Dockerfile, I get this error:So it seems to be runnning. I have a suspicion that it has to do with https and ssl, and another port or maybe 0.0.0.0 vs 127.0.0.1, but can figure it out. Hope you can help me :)
Cheers
Peter
Hi Peter Nielsen,
Just kill the process/port and try again.
Otherwise Go to Project Properties > Deubg tab > Web Server Settings > App URL and add some different ports.
Hi Girish
Ehm. Where? Inside the Docker container? :) Im not sure this is answering the right question, or is it just me? I was wondering what I did wrong, and why I could see the published version of my newly installed Umbraco inside af docker container. I can make it work in both debug and release mode on my machine :)
I have created a demo repo here, if anyone would like to take a crack at it
https://github.com/lalunastudio/umbraco-10-docker-demo
Just if anybody else comes in here.
Change localhost to 0.0.0.0 instead.
Hi!
We're running U10 in docker containers in Azure and we use the following syntax to set the correct urls. There are a few ways to do it and what works in one environment might not work in another.. Just a heads up if you run into problems in production. Also see https://andrewlock.net/5-ways-to-set-the-urls-for-an-aspnetcore-app/ !
Dev:
ENV ASPNETCORE_URLS=http://+:5001 ENV ASPNETCORE_ENVIRONMENT=Development ENTRYPOINT dotnet watch
Production:
ENTRYPOINT dotnet ./Site.Web.dll --urls=http://+;https://+
is working on a reply...