diff --git a/contrib/images/Makefile b/contrib/images/Makefile index 9fd1c11c12..dcffea10e3 100644 --- a/contrib/images/Makefile +++ b/contrib/images/Makefile @@ -2,11 +2,11 @@ all: simd-env simd-env: simd-rmi docker build --tag cosmossdk/simd -f simd-env/Dockerfile \ - $(shell git rev-parse --show-toplevel) + $(shell git rev-parse --show-toplevel) --build-arg GH_TOKEN="${GH_TOKEN}" simd-dlv: simd-rmi docker build --tag cosmossdk/simd -f simd-dlv/Dockerfile \ - $(shell git rev-parse --show-toplevel) + $(shell git rev-parse --show-toplevel) --build-arg GH_TOKEN="${GH_TOKEN}" simd-rmi: docker rmi cosmossdk/simd 2>/dev/null; true diff --git a/contrib/images/simd-dlv/Dockerfile b/contrib/images/simd-dlv/Dockerfile index c1cdd2b7bc..e21bfb3161 100644 --- a/contrib/images/simd-dlv/Dockerfile +++ b/contrib/images/simd-dlv/Dockerfile @@ -1,5 +1,7 @@ FROM golang:1.20-alpine AS build +ARG GH_TOKEN="" + RUN apk add build-base git linux-headers libc-dev RUN go install github.com/go-delve/delve/cmd/dlv@latest @@ -15,6 +17,10 @@ COPY collections/go.mod collections/go.sum /work/collections/ COPY store/go.mod store/go.sum /work/store/ COPY log/go.mod log/go.sum /work/log/ COPY x/tx/go.mod x/tx/go.sum /work/x/tx/ + +RUN go env -w GOPRIVATE="github.com/bnb-chain/*" +RUN git config --global url."https://${GH_TOKEN}@github.com".insteadOf "https://github.com" + RUN go mod download COPY ./ /work diff --git a/contrib/images/simd-env/Dockerfile b/contrib/images/simd-env/Dockerfile index 5ae2fc256d..7f1124f2dc 100644 --- a/contrib/images/simd-env/Dockerfile +++ b/contrib/images/simd-env/Dockerfile @@ -1,5 +1,7 @@ FROM golang:1.20-alpine AS build +ARG GH_TOKEN="" + RUN apk add build-base git linux-headers libc-dev WORKDIR /work @@ -14,6 +16,10 @@ COPY collections/go.mod collections/go.sum /work/collections/ COPY store/go.mod store/go.sum /work/store/ COPY log/go.mod log/go.sum /work/log/ COPY x/tx/go.mod x/tx/go.sum /work/x/tx/ + +RUN go env -w GOPRIVATE="github.com/bnb-chain/*" +RUN git config --global url."https://${GH_TOKEN}@github.com".insteadOf "https://github.com" + RUN go mod download COPY ./ /work