I have a golang script that calls a http api. Everything works great when I run it on my development computer. Once I create the container and run it I get an EOF at the end of the URL on panic. I have read a lot of issues like this and have tried everyone I see. I added a ca-certificates.crt from my host machine to the container to /etc/ssl/certs/. I set the request close to true, I have disabled Keep Alive and Compression. All of the these steps worked for others on other posts. Any help appreciated.
This is not really a question about Go, but seems to be a problem about Docker containers. Perhaps someone here can help you, but I would try asking on a Docker mailinglist or similar forums.
Do you really have FROM scratch? I’m wondering that you even get thus far as you did and your program panics… You do not even have an operating system…
So lets start with these:
Make sure your dockerfile does actually use the aforementioned base (ubuntu 16.04, or feel free to choose something better suited, see 2)
Make sure that your build host and your docker container both have similar enough versions of the glibc or musl or whatever libc implementation you use.
When those are ensured, please report back with full code that is able to reproduce the problem (maybe minify your current project as much as possible), discriptions how to reproduce and also the full error message printed by the panic. At the current point in time I do not think that the full stack were necessary, but the error message at least.