From: David Galloway Date: Thu, 18 Mar 2021 19:59:54 +0000 (-0400) Subject: Merge pull request #1709 from ceph/wip-login-dockerhub X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=87c5859093e7f9c5b98af88825b510624f606103;p=ceph-build.git Merge pull request #1709 from ceph/wip-login-dockerhub ceph*build: Login to docker.io if needed --- 87c5859093e7f9c5b98af88825b510624f606103 diff --cc scripts/build_utils.sh index 2286a803,1c904e10..129d8102 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@@ -1463,9 -1301,12 +1463,12 @@@ maybe_reset_ci_container() # dockerhub started aggressively rate limiting in November 2020. We can use an internal docker mirror if the builder is in the upstream lab. use_internal_container_registry() { - if curl -s "https://docker-mirror.front.sepia.ceph.com:5000"; then + if curl -s -k "https://docker-mirror.front.sepia.ceph.com:5000"; then REGISTRY="docker-mirror.front.sepia.ceph.com:5000/library" else + if [ -n "${DOCKER_HUB_USERNAME}" ] && [ -n "${DOCKER_HUB_PASSWORD}" ]; then + docker login -u "${DOCKER_HUB_USERNAME}" -p "${DOCKER_HUB_PASSWORD}" docker.io + fi REGISTRY="docker.io" fi }