From a1b3c72c8fce7fbe6691f45c258d76b88e51834f Mon Sep 17 00:00:00 2001 From: Kayos Date: Wed, 29 Apr 2026 18:41:59 +0000 Subject: [PATCH] =?UTF-8?q?Dockerfile:=20retry=20go=20install=20up=20to=20?= =?UTF-8?q?5x=20with=20backoff=20=E2=80=94=20DNS=20to=20192.168.0.1:53=20f?= =?UTF-8?q?lakes=20intermittently=20for=20proxy.golang.org?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 486bed8..2756526 100644 --- a/Dockerfile +++ b/Dockerfile @@ -237,8 +237,12 @@ ENV PATH=/home/crafter/go/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.li # 17. Go user tooling: govulncheck + staticcheck # ============================================================ -RUN go install golang.org/x/vuln/cmd/govulncheck@latest \ - && go install honnef.co/go/tools/cmd/staticcheck@latest +RUN for i in 1 2 3 4 5; do \ + go install golang.org/x/vuln/cmd/govulncheck@latest \ + && go install honnef.co/go/tools/cmd/staticcheck@latest \ + && break || { echo "go install attempt $i failed, sleeping $((i*10))s"; sleep $((i*10)); }; \ + done; \ + command -v govulncheck && command -v staticcheck || { echo "go install failed after 5 attempts"; exit 1; } # Make GOPATH bin discoverable for the crafter user ENV PATH=/home/crafter/go/bin:$PATH \