From 27205a429f9885bebab9e728fc630091f5eb1364 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Thu, 8 Oct 2020 09:08:19 -0400 Subject: [PATCH] Cirrus: Use google mirror for docker.io Signed-off-by: Chris Evich --- contrib/cirrus/lib.sh | 1 + contrib/cirrus/setup_environment.sh | 2 ++ test/registries.conf | 16 ++++++++-------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index e5124d8e41..8c86925d82 100644 --- a/contrib/cirrus/lib.sh +++ b/contrib/cirrus/lib.sh @@ -208,6 +208,7 @@ install_test_configs() { # as the default). This config prevents allocation of network address space used # by default in google cloud. https://cloud.google.com/vpc/docs/vpc#ip-ranges install -v -D -m 644 $SCRIPT_BASE/99-do-not-use-google-subnets.conflist /etc/cni/net.d/ + install -v -D -m 644 ./test/registries.conf /etc/containers/ } diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index 3135a5e65a..0f9bf40540 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -178,6 +178,8 @@ case "$TEST_FLAVOR" in remove_packaged_podman_files make install PREFIX=/usr ETCDIR=/etc fi + + install_test_configs ;; vendor) make clean ;; release) ;; diff --git a/test/registries.conf b/test/registries.conf index f27a282d67..35b7f89217 100644 --- a/test/registries.conf +++ b/test/registries.conf @@ -1,10 +1,10 @@ # Note that changing the order here may break tests. -[registries.search] -registries = ['docker.io', 'quay.io', 'registry.fedoraproject.org'] +unqualified-search-registries = ['docker.io', 'quay.io', 'registry.fedoraproject.org'] -[registries.insecure] -registries = [] - -#blocked (docker only) -[registries.block] -registries = [] +[[registry]] +# In Nov. 2020, Docker rate-limits image pulling. To avoid hitting these +# limits while testing, always use the google mirror for qualified and +# unqualified `docker.io` images. +# Ref: https://cloud.google.com/container-registry/docs/pulling-cached-images +prefix="docker.io" +location="mirror.gcr.io"