Discourse rebuild cannot resolve github.com

The people over at the discourse forums said that this seemed to be a docker issue and that I should post here,

I was setting up a new template for my discourses app.yml to use and upon rebuilding I ran into this issue:

I tried multiple :“fixes” that i found searching for this error including changing dockers DNS to use googles 8.8.8.8. This did not fix the problem.

I also tried removing ipv6. That did not fix the problem.

I can resolve github.com outside of docker just fine so im unsure what the problem is.
https://i.imgur.com/oUjgq8p.png

The people over at the discourse forums said that this seemed to be a docker issue and that I should post here.

If anyone knows a solution to this it would be very appreciated.

Should mention it was working just fine yesterday. Only changes done was I added a ipv6 address to my server. However, this is now removed on my quest to try and fix this.

Ubuntu 18.04.1
Docker version 18.06.0-ce, build 0ffa825
Latest Discourse version