ERR_EMPTY_RESPONSE from docker container

后端 未结 3 885
轻奢々
轻奢々 2021-02-18 23:41

I\'ve been trying to figure this out in the last hours but I\'m stuck.

I have a very simple Dockerfile which looks like this:

FROM alpine:3.6
COPY gempbo         


        
相关标签:
3条回答
  • 2021-02-19 00:13

    Another possibility why you are getting that error is that the docker run command is run through a normal cmd prompt and not the admin command prompt. Make sure you run as an admin!

    0 讨论(0)
  • 2021-02-19 00:17

    Your issue is that you are binding to the 127.0.0.1:8025 inside your code. This makes the code work from inside the container but not outside.

    You need to bind to 0.0.0.0:8025 to bind to all interfaces inside the container. So traffic coming from outside of the container is also accepted by your Go app

    0 讨论(0)
  • 2021-02-19 00:29

    Adding to the accepted answer: I had the same error message trying to run docker/getting-started.

    The problem was that "getting-started" is using port 80 and this was "occupied" (netsh http show urlacl) on my machine.

    I had to use docker run -d -p 8888:80 docker/getting-started where 8888 was an unused port. And then open "http://localhost:8888/tutorial/".

    0 讨论(0)
提交回复
热议问题