Skip to content

Instantly share code, notes, and snippets.

@aliva
Created May 12, 2019 11:59
Show Gist options
  • Save aliva/06cb2e0d7a2a5990d4d682dab57fb302 to your computer and use it in GitHub Desktop.
Save aliva/06cb2e0d7a2a5990d4d682dab57fb302 to your computer and use it in GitHub Desktop.
docker daemon.json - registry mirrors which work in iran
{
"registry-mirrors": ["https://registry.docker-cn.com", "http://repo.docker.ir:5000"]
}
@aliva
Copy link
Author

aliva commented May 12, 2019

Check instructions on docker.ir to use this config

@AmmarRajab
Copy link

Hi, I'm using docker toolbox on windows, I tried above mirrors but I still can't pass the restriction error (Iran Syria North Korea...), I tried setting mirrors for config.json of the default machine and also daemon.json configuration file and then restarting the machine but with no luck. I'm new to docker and looking for help.

@aliva
Copy link
Author

aliva commented Aug 10, 2019

@AmmarRajab use this guide to config then reload docker daemon, (maybe change order of servers and see if that helps)

note that these mirror usually work for default images and I personally see some issues for some user images, in that case it needs some try and errors, sadly I don't maintain those servers so I can't do anything about that

@AmmarRajab
Copy link

Thanks for your reply very appreciated. I managed finally to get it working by using combination of VPN and port forwarding as in the following article:
https://nikhilwanpal.in/blog/using-docker-and-a-private-registry-with-vpn-on-windows/

Mentioned this for future reference and it might be useful for other people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment