Hi,
Using Docker for mac, (docker version 1.12.1), I would like to create a simple cache for all my docker images.
I’m unable to get it to work. Here is a script to recreate what I’ve done:
mkdir ~/data ; mkdir ~/temp ; cd ~/temp
docker create --name registry registry:2
docker cp registry:/etc/docker/registry/config.yml .
docker rm -f registry
printf 'proxy:\n remoteurl: https://registry-1.docker.io\n' | tee -a config.yml
docker run -d -p 5000:5000 --restart=always --name registry -v ~/data:/var/lib/registry -v $(pwd)/config.yml:/etc/docker/registry/config.yml registry:2
The registry starts ok. Then I go to my docker-for-mac preferences and add localhost:5000
to the “registry mirrors” in the “advanced” panel. Then I restart.
After restart, I do a pull, an rmi and a pull of an image, but the registry logs don’t show any access and the pull re-downloads the data.
I expect this to use my local registry (even though it might not be available when docker first restarts).
Any ideas how to get this to work?
Incidentally, I also tried a vagrant version and was unable to get that to work either.
Thanks,
Phil