github.com/lbryio/lbcd@v0.22.119/Dockerfile (about) 1 # This Dockerfile builds lbcd 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 lbcd amd64 container: 4 # 5 # docker build . -t yourregistry/lbcd 6 # 7 # You can use the following command to buid an arm64v8 container: 8 # 9 # docker build . -t yourregistry/lbcd --build-arg ARCH=arm64v8 10 # 11 # For more information how to use this docker image visit: 12 # https://github.com/lbryio/lbcd/tree/master/docs 13 # 14 # 9246 Mainnet LBRY peer-to-peer port 15 # 9245 Mainet RPC port 16 17 ARG ARCH=amd64 18 19 FROM golang:1.19 AS build-container 20 21 ARG ARCH 22 23 ADD . /app 24 WORKDIR /app 25 RUN set -ex \ 26 && if [ "${ARCH}" = "amd64" ]; then export GOARCH=amd64; fi \ 27 && if [ "${ARCH}" = "arm32v7" ]; then export GOARCH=arm; fi \ 28 && if [ "${ARCH}" = "arm64v8" ]; then export GOARCH=arm64; fi \ 29 && echo "Compiling for $GOARCH" \ 30 && go install -v . ./cmd/... 31 32 FROM $ARCH/debian:bullseye-20220418-slim 33 34 COPY --from=build-container /go/bin /bin 35 36 VOLUME ["/root/.lbcd"] 37 38 EXPOSE 9245 9246 39 40 ENTRYPOINT ["lbcd"]