Info
This post has some corrupted data. Will fix it soon!
In this post we’ve learned how to proxy PyPI and make it cached in our local repo, but for this time I want to share similar thing but it’s for docker image. Here we go!
- Make docker group and docker proxy
We can see the configurations below :
Explanation :
- Name of proxy repository
- Allow anonymous user for pulling the image
- Remote registry. https://registry-1.docker.io is docker hub remote storage URL.
- Use docker hub as docker index
Explanation :
- Name of group repository
- 5000 is port number for pulling the image through nexus registry
- Allow anonymous user for pulling the image.
- Set docker-proxy ( proxied docker registry we’ve created before ) to be a member of this group repo
- Tell docker to consider the image registry we’ve created as registry mirrors to cache the image and as insecure registry, so there’s no need to verify TLS ( not recommended for production env ) by creating new file called daemon.json in /etc/docker directory
Restart docker service afterwards. Then verify by executing docker info
- Try to pull an image
And it works like a charm !