I'm standing up a few docker hosts to run in a production environment. We want all of our images to have to go through our container pipeline and we do not want to be able to pull images from Docker Hub (security concerns).
How can I stop docker being able to pull images from dockerhub? Ideally I would like to do this via configuring the docker daemon.
I think it is not possible to prevent docker for searching docker hub..
But it is possible to prevent/avoid pulling image from docker hub. And it this case, all searching on docker hub will find nothing.
To do it: you must concatenate your private registry url(without https:// or http://) with your image name like:
FROM myprivate_registry/myimagename:if_version
or FROM myprivate_registry:registry_port/myimagename:if_version
Also, you can say to docker to use your private registry as its first registry and docker hub will become the second:
`ADD_REGISTRY='--add-registry myregistry'` or `INSECURE_REGISTRY='--insecure-registry myregistry'`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With