The world’s largest container registry – Dockerhub – has announced they will limit the number of pulls based on subscription tiers of their user base. As we rely on Docker services, this article describes the strategy we put together, to deal with recently introduced limits. Hopefully it will inspire those projects with a similar approach to hosting cloud based applications.
We have derived following strategies to address new situation:
- Move images under own docker container registry – if you are using Gitlab, as we do, you could follow instructions describing, how to set it up in Gitlab.
- Choose Docker subscription plan fitting your situation – pricing and limits can be found on docker official website.
- Use a proxy for caching downloaded docker images – strategy we’ve chosen as the best for our open source Shopsys Framework. See details below. Furthermore, Gitlab team has announced they are planning to release an open source dependency proxy at the end of November 2020 for all its users. If you can wait for this solution to be released, just be patient a little bit longer. 🙂
Setting up proxy for caching docker images
In order to set up caching of Docker container images, we have made following steps:
- Set up Docker Hub Pull Through Mirror – see this easy to follow manual.
- Set up Gitlab CI to use just created mirror – please see article with instructions.
- You are done – easy right? Of course, everything needs to be thoroughly stress tested and validated. Make sure you double check the relevant IP address and port is not accessible directly from the internet jungle.
Hopefully, this article will help you and your projects.