github.com/palcoin-project/palcd@v1.0.0/Dockerfile (about)

     1  # This Dockerfile builds btcd from source and creates a small (55 MB) docker container based on alpine linux.
     2  #
     3  # Clone this repository and run the following command to build and tag a fresh btcd amd64 container:
     4  #
     5  # docker build . -t yourregistry/btcd
     6  #
     7  # You can use the following command to buid an arm64v8 container:
     8  #
     9  # docker build . -t yourregistry/btcd --build-arg ARCH=arm64v8
    10  #
    11  # For more information how to use this docker image visit:
    12  # https://github.com/palcoin-project/palcd/tree/master/docs
    13  #
    14  # 1948 Mainnet Bitcoin peer-to-peer port
    15  # 1967  Mainet RPC port
    16  
    17  ARG ARCH=amd64
    18  
    19  FROM golang:1.14-alpine3.12 AS build-container
    20  
    21  ARG ARCH
    22  ENV GO111MODULE=on
    23  
    24  ADD . /app
    25  WORKDIR /app
    26  RUN set -ex \
    27    && if [ "${ARCH}" = "amd64" ]; then export GOARCH=amd64; fi \
    28    && if [ "${ARCH}" = "arm32v7" ]; then export GOARCH=arm; fi \
    29    && if [ "${ARCH}" = "arm64v8" ]; then export GOARCH=arm64; fi \
    30    && echo "Compiling for $GOARCH" \
    31    && go install -v . ./cmd/...
    32  
    33  FROM $ARCH/alpine:3.12
    34  
    35  COPY --from=build-container /go/bin /bin
    36  
    37  VOLUME ["/root/.palcd"]
    38  
    39  #EXPOSE 8333 8334
    40  EXPOSE 1948 1967
    41  
    42  ENTRYPOINT ["palcd"]