Skip to content

Instantly share code, notes, and snippets.

@doitian
Last active October 27, 2023 17:31
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doitian/2caf68f9a0afa9134b6aac13adee899a to your computer and use it in GitHub Desktop.
Save doitian/2caf68f9a0afa9134b6aac13adee899a to your computer and use it in GitHub Desktop.
[Configure Docker Hub mirror in /etc/containers/registries.conf] #docker #podman #proxy
unqualified-search-registries = ['docker.io']
[[registry]]
prefix = "docker.io"
location = "docker.io"
[[registry.mirror]]
prefix = "docker.io"
# This will set the docker registry mirror of a chinese university.
# DON'T use it unless you have a network connection issue and you trust the mirror provider.
location = "docker.mirrors.ustc.edu.cn"
@pavelpulec
Copy link

@Studentenfutter
Copy link

As this gist is a top result on Google: Please dont just copy & paste this config!
This will set the docker registry mirror of a chinese university if docker.io can not be reached from your network:

[[registry.mirror]]
prefix = "docker.io"
location = "docker.mirrors.ustc.edu.cn"

@doitian
Copy link
Author

doitian commented Jun 3, 2023

As this gist is a top result on Google: Please dont just copy & paste this config! This will set the docker registry mirror of a chinese university if docker.io can not be reached from your network:

[[registry.mirror]]
prefix = "docker.io"
location = "docker.mirrors.ustc.edu.cn"

Good catch.

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