Very slow Docker image download

AI-generated summary

A user, sudoman, experienced slow Docker image downloads while running ./launcher rebuild app, despite having sufficient bandwidth. marianord suggested that the issue lies between the VM provider and Docker Hub. Falco confirmed that Discourse uses Docker Hub and provided a workaround by pre-downloading the base image using docker pull. A potential long-term solution is to host images on GitHub Docker Registry once it becomes available.

When recently running ./launcher rebuild app, two Docker images were scheduled to download. One of them took a while, but another is taking a very long time (> 20 minutes).

Our vm has plenty of bandwidth. When checking nethogs, there was usually no download bandwidth at all for the Docker image that successfully downloaded (but occassionally that one was > 1 MB/s), and none for one I’m still waiting on.

I suppose that this is likely an issue with whatever Docker repository you’re using, but I thought I would bring it up. It might make more sense for us to compile our own Docker images, which is what we were doing earlier. Thanks.

My understanding is that Discourse uses Docker HUB, therefore, any issue in bandwidth and/or download speed is between your service provider (VM) and the Docker server itself.

Yes, we use Docker Hub and I know that sometimes it can be a bit slow.

A workaround you can use is to pre-download the base image before issuing the rebuild, with something like:

docker pull $(grep -o "discourse/base:[0-9.-]*" launcher)

Maybe when GitHub Docker Registry becomes usable we can also host the image in there.