github.com/datachainlab/burrow@v0.25.0/Dockerfile (about)

     1  # For solc binary
     2  FROM ethereum/solc:0.4.25 as solc-builder
     3  # We use a multistage build to avoid bloating our deployment image with build dependencies
     4  FROM golang:1.11.5-alpine3.8 as builder
     5  
     6  RUN apk add --no-cache --update git bash make
     7  
     8  ARG REPO=$GOPATH/src/github.com/hyperledger/burrow
     9  COPY . $REPO
    10  WORKDIR $REPO
    11  
    12  # Build purely static binaries
    13  RUN make build
    14  
    15  # This will be our base container image
    16  FROM alpine:3.8
    17  
    18  # Variable arguments to populate labels
    19  ARG USER=burrow
    20  ARG INSTALL_BASE=/usr/local/bin
    21  
    22  # Fixed labels according to container label-schema
    23  LABEL org.label-schema.schema-version="1.0"
    24  LABEL org.label-schema.name = "Burrow"
    25  LABEL org.label-schema.vendor="Hyperledger Burrow Authors"
    26  LABEL org.label-schema.description="Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node."
    27  LABEL org.label-schema.license="Apache-2.0"
    28  LABEL org.label-schema.vcs-url="https://github.com/hyperledger/burrow"
    29  
    30  # Run burrow as burrow user; not as root user
    31  ENV BURROW_PATH /home/$USER
    32  RUN addgroup -g 101 -S $USER && adduser -S -D -u 1000 $USER $USER
    33  WORKDIR $BURROW_PATH
    34  
    35  # Copy binaries built in previous stage
    36  COPY --from=builder /go/src/github.com/hyperledger/burrow/bin/burrow $INSTALL_BASE/
    37  COPY --from=solc-builder /usr/bin/solc $INSTALL_BASE/
    38  
    39  # Expose ports for 26656:peer; 26658:info; 10997:grpc
    40  EXPOSE 26656
    41  EXPOSE 26658
    42  EXPOSE 10997
    43  
    44  USER $USER:$USER
    45  ENTRYPOINT [ "burrow" ]