Is there any way to stop pulling a docker image from the public docker-hub registry while building image locally. Note: We are maintaining a private registry that contains all the images. Only and only docker-engine should search for an image from the private registry and not from the public registry.

1 Answer 1


You cannot change the default registry (see this). You have to specify which registry to use like this:

docker pull myprivatereg:port/library/image

Or, in a Dockerfile:

FROM myprivatereg:port/library/image

(This question was also asked in StackOverlow).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.