replace bor with erigon for archive

This commit is contained in:
cventastic
2022-10-19 12:21:22 +02:00
parent 7163d7e630
commit 9cf3c5b71e
3 changed files with 98 additions and 0 deletions

31
polygon/erigon/Dockerfile Normal file
View File

@@ -0,0 +1,31 @@
# Build Bor in a stock Go builder container
FROM golang:1.19-alpine as builder
# Install packages we need
RUN apk add --no-cache make g++ gcc musl-dev linux-headers git
# Grab ERIGON_VERSION from Build Args
ARG ERIGON_VERSION
# Clone the repo to that folder
RUN git clone --recurse-submodules -j8 https://github.com/maticnetwork/erigon.git
# change into repo
WORKDIR ./erigon
# checkout version
RUN git checkout ${ERIGON_VERSION}
# Build Bor
RUN make erigon
# Pull Bor into a second stage deploy alpine container
FROM alpine:latest
RUN apk add --no-cache ca-certificates curl jq
COPY --from=builder /go/erigon/build/bin/erigon /usr/local/bin/
# Set entrypoint
COPY ./scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod u+x /usr/local/bin/entrypoint.sh
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]