Can I pull an image without Internet when the image exists in docker registry-mirror?

I create a registry mirror. Can I pull an image without Internet? I have created a mirror using this command:

docker run -d -p 5555:5000 -e STORAGE_PATH=/mirror -e STANDALONE=false -e MIRROR_SOURCE= -e MIRROR_SOURCE_INDEX= -v /Users/v11/Documents/docker-mirror:/mirror  --restart=always --name mirror registry

When I pull an image like hello-world:

  • 404 when pulling a private Docker repo from Hub
  • Run a new container based on currently running container
  • Remote Docker and volume binding
  • How to delete Unreachable Nodes in Docker Cloud?
  • How to setup learning environment for Udacity Deep Learning class with TensorFlow (Windows)
  • Is Alpine Linux an implementation of a Unikernel?
  • docker pull image

    I can find the image in local path what I set “/Users/v11/Documents/docker-mirror”. Does it mean I succeed in creating mirror? But, I closed the Internet, and delete the hello-world:

    docker rmi hello-world

    and pull again, but it failed. I want to know whether I must use mirror with Internet? if not, what is wrong with me?

    By the way, I have started docker daemon with this ENV:

    docker --insecure-registry --registry-mirror= -d &

    and is my boot2docker ip.

  • Run script after container entrypoint in docker-compose
  • Docker. Error: Cannot start container: port has already been allocated
  • Docker disconnect all containers from docker network
  • How do I move a docker container's image to a persistent disk?
  • X11 forward to windows x server for docker client in AWS
  • How does Vagrant restart docker containers on bootup?
  • One Solution collect form web for “Can I pull an image without Internet when the image exists in docker registry-mirror?”

    In your configuration you specified a non-standalone setup using a MIRROR_SOURCE_INDEX. So whenever you want to search for an image that index is queried. The other MIRROR_SOURCE gets queried for the image itself.

    You might be able to retrieve an image offline with a pull request (that has already been pulled before while you were online). But you are not able to issue docker search commands when the index is not available.

    If you want to be completely independent from the public docker registry then you would need to setup your own private registry.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.