WIP: Feature/6/jeffreypicard/dockerize for deployment #7

Closed
jeffreypicard wants to merge 80 commits from feature/6/jeffreypicard/dockerize-for-deployment into master
2 changed files with 8 additions and 10 deletions
Showing only changes of commit 7daf79ef8f - Show all commits

View file

@ -14,12 +14,9 @@
# 9246 Mainnet Bitcoin peer-to-peer port
# 9245 Mainet RPC port
ARG ARCH=amd64
FROM golang AS build-container
FROM golang:1.17-buster AS build-container
ARG ARCH
ENV GO111MODULE=on
# ENV GO111MODULE=on
ADD . /app
WORKDIR /app
@ -27,14 +24,15 @@ RUN set -ex \
&& if [ "${ARCH}" = "amd64" ]; then export GOARCH=amd64; fi \
&& if [ "${ARCH}" = "arm64v8" ]; then export GOARCH=arm64; fi \
&& echo "Compiling for $GOARCH" \
&& go install -v . ./cmd/...
&& CGO_ENABLED=0 go build .
FROM $ARCH/alpine:3.14
FROM debian:11-slim
COPY --from=build-container /go/bin /bin
COPY --from=build-container /app/lbcd /
COPY --from=build-container /app/run.sh /
VOLUME ["/root/.lbcd"]
EXPOSE 9245 9246
ENTRYPOINT ["/app/run.sh"]
ENTRYPOINT ["/run.sh"]

2
run.sh
View file

@ -1,2 +1,2 @@
#!/bin/bash
lbcd --txindex --notls --rpcuser=lbry --rpcpass=lbry --rpclisten=$LISTEN_ADDR:9245
/lbcd --txindex --notls --rpcuser=lbry --rpcpass=lbry --rpclisten=