Skip to content

Commit aaf9932

Browse files
authored
Re-add Go to fabric-tools image (#4176)
Since the images are no longer based on the golang alpine images, need to manually install go to the fabric-tools image. go is needed for users that use fabric-tools image to package go chaincodes. Signed-off-by: David Enyeart <[email protected]>
1 parent 268a8a1 commit aaf9932

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

images/tools/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,20 @@ RUN make tools GO_TAGS=${GO_TAGS} FABRIC_VER=${FABRIC_VER}
5050
ARG UBUNTU_VER
5151
FROM ubuntu:${UBUNTU_VER}
5252

53+
ARG TARGETARCH
54+
ARG TARGETOS
5355
ARG FABRIC_VER
56+
ARG GO_VER
5457

5558
RUN apt update && apt install -y \
5659
bash \
5760
curl \
5861
jq \
5962
tzdata
6063

64+
RUN curl -sL https://go.dev/dl/go${GO_VER}.${TARGETOS}-${TARGETARCH}.tar.gz | tar zxvf - -C /usr/local
65+
ENV PATH="/usr/local/go/bin:$PATH"
66+
6167
# set up nsswitch.conf for Go's "netgo" implementation
6268
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
6369
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf

0 commit comments

Comments
 (0)