Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run or use multiple registry mirror?

I know how to run a registry mirror

docker run -p 5000:5000 \
    -e STANDALONE=false \
    -e MIRROR_SOURCE=https://registry-1.docker.io \
    -e MIRROR_SOURCE_INDEX=https://index.docker.io \
    registry

and how to use it

docker --registry-mirror=http://10.0.0.2:5000 -d

But how can I use multiple registry mirror.

This is what I need:

  • Docker hub mirror
  • Google container registry mirror for k8s
  • Private registry

So I have to make tow registry mirror and a private registry.I want to docker run registry mirror 1st and 2nd registry, and one more docker run registry hold my private registry. The client will use three of these registry.

I have no clue of how to do this,I think this is a common use case, please help, thanks.

like image 688
wener Avatar asked Aug 11 '15 16:08

wener


1 Answers

You can use a PullSecret to tell Kubernetes what registry to get your containers from. Please see:

http://releases.k8s.io/release-1.0/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod

like image 115
lavalamp Avatar answered Oct 19 '22 23:10

lavalamp