linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] travis: Add Docker Hub pull rate limit workaround
@ 2021-04-15 12:56 Petr Vorel
  0 siblings, 0 replies; only message in thread
From: Petr Vorel @ 2021-04-15 12:56 UTC (permalink / raw)
  To: linux-integrity; +Cc: Petr Vorel, Mimi Zohar

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@suse.cz>
---
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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-15 12:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 12:56 [PATCH 1/1] travis: Add Docker Hub pull rate limit workaround Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).