Docker: we cannot access it in Iran.

Many online services have banned Iranians from using their services in recent years. In my opinion, this is a real case of racism in the 21st century. Our job is to develop software for simple projects, not to engage in politics.

Since I resolved the docker access problem with the repository mirror last week, I wanted to write a short blog to share “how do I fix docker download problems in Iran?”.


docker download problems in Iran

The first step is to edit the daemon.json file as follows:

vi /etc/docker/daemon.json

The second step is to add a mirror repository to the daemon.json file. You can use these public repository mirrors if you have not a personal repository mirror inside your company:

{ "registry-mirrors": ["", "", "", ""] }

As a next step, save daemon.json and reset daemon and docker using these commands.

systemctl daemon-reload

systemctl restart docker

Congratulations. Docker images can now be accessed without any issues.

I wish Docker and other tech companies would fix our issue. Racism is the worst thing that has ever happened to humanity.