ERR_EMPTY_RESPONSE from docker container

后端 未结 3 869
轻奢々
轻奢々 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: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

提交回复
热议问题