diff --git a/images/tools/Dockerfile b/images/tools/Dockerfile index fe9ea37a34e..8afa0352cff 100644 --- a/images/tools/Dockerfile +++ b/images/tools/Dockerfile @@ -50,7 +50,10 @@ RUN make tools GO_TAGS=${GO_TAGS} FABRIC_VER=${FABRIC_VER} ARG UBUNTU_VER FROM ubuntu:${UBUNTU_VER} +ARG TARGETARCH +ARG TARGETOS ARG FABRIC_VER +ARG GO_VER RUN apt update && apt install -y \ bash \ @@ -58,6 +61,9 @@ RUN apt update && apt install -y \ jq \ tzdata +RUN curl -sL https://go.dev/dl/go${GO_VER}.${TARGETOS}-${TARGETARCH}.tar.gz | tar zxvf - -C /usr/local +ENV PATH="/usr/local/go/bin:$PATH" + # set up nsswitch.conf for Go's "netgo" implementation # - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275 # - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf