From afcf2dcb3fd99a9c10d90f272a8416e786238011 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 10 Jul 2023 14:23:13 -0500 Subject: [PATCH 1/3] Fix http path. --- Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index fd459a9ac..35fbf57de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,14 +11,11 @@ RUN apk add --no-cache gcc musl-dev binutils-gold linux-headers git # Configure creds for gitea ARG GIT_VDBTO_TOKEN -ENV GOPROXY="https://goproxy.cn,direct" - # Get dependencies - will also be cached if we won't change go.mod/go.sum WORKDIR /go-ethereum/ COPY go.mod go.sum . -RUN [ -n "$GIT_VDBTO_TOKEN" ] && \ - git config --global url."https://$GIT_VDBTO_TOKEN@git.vdb.to/".insteadOf "https://git.vdb.to/" && \ - go mod download && \ +RUN [ -n "$GIT_VDBTO_TOKEN" ] && git config --global url."https://$GIT_VDBTO_TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/" ; \ + go mod download ; \ rm -f ~/.gitconfig COPY . . -- 2.45.2 From d398bfc902efb18f6d8fad640bf66c50f987c962 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 10 Jul 2023 14:28:37 -0500 Subject: [PATCH 2/3] Put it back to an if for clarity. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 35fbf57de..eb22d1056 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ ARG GIT_VDBTO_TOKEN # Get dependencies - will also be cached if we won't change go.mod/go.sum WORKDIR /go-ethereum/ COPY go.mod go.sum . -RUN [ -n "$GIT_VDBTO_TOKEN" ] && git config --global url."https://$GIT_VDBTO_TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/" ; \ - go mod download ; \ +RUN if [ -n "$GIT_VDBTO_TOKEN" ]; then git config --global url."https://$GIT_VDBTO_TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/"; fi && \ + go mod download && \ rm -f ~/.gitconfig COPY . . -- 2.45.2 From ec0caf8f69cc029f4c2109d68a68c4782dea8b2c Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 10 Jul 2023 14:48:39 -0500 Subject: [PATCH 3/3] Fix build. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index eb22d1056..e3b60b215 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,9 @@ ARG GIT_VDBTO_TOKEN # Get dependencies - will also be cached if we won't change go.mod/go.sum WORKDIR /go-ethereum/ COPY go.mod go.sum . +COPY wrapmain wrapmain RUN if [ -n "$GIT_VDBTO_TOKEN" ]; then git config --global url."https://$GIT_VDBTO_TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/"; fi && \ + cd wrapmain && \ go mod download && \ rm -f ~/.gitconfig -- 2.45.2