diff --git a/tools/internal_ci/helper_scripts/prepare_build_linux_rc b/tools/internal_ci/helper_scripts/prepare_build_linux_rc index ea2a17f2bcf..8715d6c8e0d 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_linux_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_linux_rc @@ -22,6 +22,9 @@ ulimit -n 32768 # Move docker's storage location to scratch disk so we don't run out of space. echo 'DOCKER_OPTS="${DOCKER_OPTS} --graph=/tmpfs/docker"' | sudo tee --append /etc/default/docker +# Use container registry mirror for pulling docker images (should make downloads faster) +# See https://cloud.google.com/container-registry/docs/using-dockerhub-mirroring +echo 'DOCKER_OPTS="${DOCKER_OPTS} --registry-mirror=https://mirror.gcr.io"' | sudo tee --append /etc/default/docker sudo service docker restart # Populate xdg-cache-home to workaround https://github.com/grpc/grpc/issues/11968 diff --git a/tools/run_tests/dockerize/build_and_run_docker.sh b/tools/run_tests/dockerize/build_and_run_docker.sh index 80aec82c3d6..323c2f78af9 100755 --- a/tools/run_tests/dockerize/build_and_run_docker.sh +++ b/tools/run_tests/dockerize/build_and_run_docker.sh @@ -36,13 +36,13 @@ DOCKER_IMAGE_NAME=$(basename $DOCKERFILE_DIR)_$(sha1sum $DOCKERFILE_DIR/Dockerfi # Pull the base image to force an update if [ "$DOCKER_BASE_IMAGE" != "" ] then - docker pull $DOCKER_BASE_IMAGE + time docker pull $DOCKER_BASE_IMAGE fi if [ "$DOCKERHUB_ORGANIZATION" != "" ] then DOCKER_IMAGE_NAME=$DOCKERHUB_ORGANIZATION/$DOCKER_IMAGE_NAME - docker pull $DOCKER_IMAGE_NAME + time docker pull $DOCKER_IMAGE_NAME else # Make sure docker image has been built. Should be instantaneous if so. docker build -t $DOCKER_IMAGE_NAME $DOCKERFILE_DIR diff --git a/tools/run_tests/dockerize/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh index eea00da821e..06a5dae6a5f 100755 --- a/tools/run_tests/dockerize/build_docker_and_run_tests.sh +++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh @@ -40,7 +40,7 @@ DOCKER_IMAGE_NAME=$(basename $DOCKERFILE_DIR)_$(sha1sum $DOCKERFILE_DIR/Dockerfi if [ "$DOCKERHUB_ORGANIZATION" != "" ] then DOCKER_IMAGE_NAME=$DOCKERHUB_ORGANIZATION/$DOCKER_IMAGE_NAME - docker pull $DOCKER_IMAGE_NAME + time docker pull $DOCKER_IMAGE_NAME else # Make sure docker image has been built. Should be instantaneous if so. docker build -t $DOCKER_IMAGE_NAME $DOCKERFILE_DIR diff --git a/tools/run_tests/dockerize/build_interop_image.sh b/tools/run_tests/dockerize/build_interop_image.sh index 09e062980d8..dbc6bdeea5c 100755 --- a/tools/run_tests/dockerize/build_interop_image.sh +++ b/tools/run_tests/dockerize/build_interop_image.sh @@ -78,7 +78,7 @@ fi if [ "$DOCKERHUB_ORGANIZATION" != "" ] then BASE_IMAGE=$DOCKERHUB_ORGANIZATION/$BASE_IMAGE - docker pull $BASE_IMAGE + time docker pull $BASE_IMAGE else # Make sure docker image has been built. Should be instantaneous if so. docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/interoptest/$BASE_NAME || exit $?