github.com/pvitto98/fabric@v2.1.1+incompatible/images/peer/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  
     8  FROM alpine:${ALPINE_VER} as peer-base
     9  RUN apk add --no-cache tzdata
    10  
    11  FROM golang:${GO_VER}-alpine${ALPINE_VER} as golang
    12  RUN apk add --no-cache \
    13  	bash \
    14  	gcc \
    15  	git \
    16  	make \
    17  	musl-dev
    18  ADD . $GOPATH/src/github.com/hyperledger/fabric
    19  WORKDIR $GOPATH/src/github.com/hyperledger/fabric
    20  
    21  FROM golang as peer
    22  ARG GO_TAGS
    23  RUN make peer GO_TAGS=${GO_TAGS}
    24  
    25  FROM peer-base
    26  ENV FABRIC_CFG_PATH /etc/hyperledger/fabric
    27  VOLUME /etc/hyperledger/fabric
    28  VOLUME /var/hyperledger
    29  COPY --from=peer /go/src/github.com/hyperledger/fabric/build/bin /usr/local/bin
    30  COPY --from=peer /go/src/github.com/hyperledger/fabric/sampleconfig/msp ${FABRIC_CFG_PATH}/msp
    31  COPY --from=peer /go/src/github.com/hyperledger/fabric/sampleconfig/core.yaml ${FABRIC_CFG_PATH}
    32  EXPOSE 7051
    33  CMD ["peer","node","start"]