stop pulling a docker image from the public docker-hub registry
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).