I use MAC OS X.And I want to use mirror in this tutorial, its step 1 is need to do this:
docker --registry-mirror=http://<my-docker-mirror-host> -d
But, when I use this command in terminal, it did't work:
flag provided but not defined: --registry-mirror See 'docker --help'.
then, I use the other way in tutorial:
you may be able to add the --registry-mirror options to the DOCKER_OPTS variable in /etc/default/docker
I don't know where to add this DOCKER_OPTS. I want to use mirror in client 1.7.0. Can anyone tell me how to set up the mirror?.
I use this command to create mirror:
docker run -d -p 5000:5000 -e REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/Users/v11/Documents/docker-registry --restart=always --name mirror -e STANDALONE=false -e MIRROR_SOURCE=https://registry-1.docker.io -e MIRROR_SOURCE_INDEX=https://index.docker.io registry
I test it and find it didn't work like it describe that can download from local registry. Even if I fail to use this command :
docker push localhost:5000/batman/ubuntu
This command can work before, I really don't know what happened. Maybe the flag "STANDALONE=false" affect? I want to setup mirror, can anyone tell me how to do.Thanks.