github.com/canhui/fabric_ca2_2@v2.0.0-alpha+incompatible/images/fabric-ca/Dockerfile (about)

     1  #
     2  # Copyright IBM Corp. All Rights Reserved.
     3  #
     4  # SPDX-License-Identifier: Apache-2.0
     5  #
     6  ARG GO_VER
     7  ARG ALPINE_VER
     8  
     9  FROM golang:${GO_VER}-alpine as builder
    10  ARG GO_LDFLAGS
    11  ARG GO_TAGS
    12  
    13  RUN apk add --no-cache \
    14  	gcc \
    15  	git \
    16  	libtool \
    17  	musl-dev;
    18  
    19  ADD . $GOPATH/src/github.com/hyperledger/fabric-ca
    20  RUN go install -tags "${GO_TAGS}" -ldflags "${GO_LDFLAGS}" \
    21  	github.com/hyperledger/fabric-ca/cmd/fabric-ca-server \
    22  	&& go install -tags "${GO_TAGS}" -ldflags "${GO_LDFLAGS}" \
    23  	github.com/hyperledger/fabric-ca/cmd/fabric-ca-client
    24  
    25  
    26  FROM alpine:${ALPINE_VER}
    27  RUN apk add --no-cache \
    28  	tzdata \
    29  	libltdl;
    30  ENV FABRIC_CA_HOME /etc/hyperledger/fabric-ca-server
    31  COPY --from=builder /go/bin /usr/local/bin
    32  EXPOSE 7054
    33  CMD fabric-ca-server start -b admin:adminpw