github.com/osdi23p228/fabric@v0.0.0-20221218062954-77808885f5db/images/orderer/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 alpine:${ALPINE_VER} as base
     8  RUN apk add --no-cache tzdata
     9  # set up nsswitch.conf for Go's "netgo" implementation
    10  # - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
    11  # - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
    12  RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
    13  
    14  FROM golang:${GO_VER}-alpine${ALPINE_VER} as golang
    15  RUN apk add --no-cache \
    16  	gcc \
    17  	musl-dev \
    18  	git \
    19  	bash \
    20  	make;
    21  ADD . $GOPATH/src/github.com/hyperledger/fabric
    22  WORKDIR $GOPATH/src/github.com/hyperledger/fabric
    23  
    24  FROM golang as orderer
    25  ARG GO_TAGS
    26  RUN make orderer GO_TAGS=${GO_TAGS}
    27  
    28  FROM base
    29  ENV FABRIC_CFG_PATH /etc/hyperledger/fabric
    30  VOLUME /etc/hyperledger/fabric
    31  VOLUME /var/hyperledger
    32  COPY --from=orderer /go/src/github.com/osdi23p228/fabric/build/bin /usr/local/bin
    33  COPY --from=orderer /go/src/github.com/osdi23p228/fabric/sampleconfig/msp ${FABRIC_CFG_PATH}/msp
    34  COPY --from=orderer /go/src/github.com/osdi23p228/fabric/sampleconfig/orderer.yaml ${FABRIC_CFG_PATH}
    35  COPY --from=orderer /go/src/github.com/osdi23p228/fabric/sampleconfig/configtx.yaml ${FABRIC_CFG_PATH}
    36  EXPOSE 7050
    37  CMD ["orderer"]