[PATCH 1/1] travis: Add Docker Hub pull rate limit workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use mirror.gcr.io mirror for Docker to workaround pull rate limit in
docker registry to avoid common error:
anyrequests: You have reached your pull rate limit.

This still sometimes use docker registry, which can leads to occasional
failures, but less often.

Correct solution would be to migrate to Github Actions.

Signed-off-by: Petr Vorel <pvorel@xxxxxxx>
---
Hi Mimi,

this expects to be applied after my 2 previous fixes ("travis: Fix
openSUSE Tumbleweed" and "tests/install-swtpm.sh: Add tar option
--no-same-owner"):
https://patchwork.kernel.org/project/linux-integrity/list/?series=467745&state=*

Tested:
https://travis-ci.org/github/pevik/ima-evm-utils/builds/767149815

Kind regards,
Petr

 .travis.yml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index ac6b2a5..e96e52a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -84,6 +84,17 @@ before_install:
             sudo curl -L https://github.com/opencontainers/runc/releases/download/v1.0.0-rc93/runc.amd64 -o /usr/bin/runc
             sudo chmod +x /usr/bin/runc
         fi
+
+    # Docker Hub pull rate limit workaround for docker
+    - >
+        if [ "$CONTAINER" = "docker" ]; then
+            conf="/etc/docker/daemon.json"
+            tmp=$(mktemp)
+            sudo jq '."registry-mirrors" += ["https://mirror.gcr.io";]' $conf > $tmp
+            sudo mv $tmp $conf
+            sudo systemctl daemon-reload
+            sudo systemctl restart docker
+        fi
     - $CONTAINER info
 
     - DIR="/usr/src/ima-evm-utils"
-- 
2.31.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux