github.com/Hnampk/fabric@v2.1.1+incompatible/images/tools/Dockerfile (about)

     1  # Copyright IBM Corp. All Rights Reserved.
     2  #
     3  # SPDX-License-Identifier: Apache-2.0
     4  
     5  ARG GO_VER
     6  ARG ALPINE_VER
     7  FROM golang:${GO_VER}-alpine${ALPINE_VER} as golang
     8  
     9  RUN apk add --no-cache \
    10  	bash \
    11  	gcc \
    12  	git \
    13  	make \
    14  	musl-dev;
    15  
    16  ADD . $GOPATH/src/github.com/hyperledger/fabric
    17  WORKDIR $GOPATH/src/github.com/hyperledger/fabric
    18  
    19  FROM golang as tools
    20  RUN make configtxgen configtxlator cryptogen peer discover idemixgen
    21  
    22  FROM golang:${GO_VER}-alpine
    23  # git is required to support `go list -m`
    24  RUN apk add --no-cache \
    25  	bash \
    26  	git \
    27  	jq \
    28  	tzdata;
    29  ENV FABRIC_CFG_PATH /etc/hyperledger/fabric
    30  VOLUME /etc/hyperledger/fabric
    31  COPY --from=tools /go/src/github.com/hyperledger/fabric/build/bin /usr/local/bin
    32  COPY --from=tools /go/src/github.com/hyperledger/fabric/sampleconfig ${FABRIC_CFG_PATH}