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 \