add support for linea
This commit is contained in:
21
linea/erigon/#Dockerfile#
Normal file
21
linea/erigon/#Dockerfile#
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM docker.io/library/golang:1.20-alpine3.17 AS builder
|
||||
RUN apk add --no-cache make g++ gcc musl-dev linux-headers git
|
||||
ARG ERIGON_VERSION=v2.48.1
|
||||
ARG ERIGON_REPOSITORY=https://github.com/ledgerwatch/erigon.git
|
||||
|
||||
RUN git clone --recurse-submodules -j8 $ERIGON_REPOSITORY
|
||||
|
||||
WORKDIR ./erigon
|
||||
|
||||
RUN git checkout ${ERIGON_VERSION}
|
||||
|
||||
RUN make erigon
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache ca-certificates curl jq libstdc++ libgcc
|
||||
COPY --from=builder /go/erigon/build/bin/erigon /usr/local/bin/
|
||||
|
||||
COPY ./scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod u+x /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
||||
1
linea/erigon/.#Dockerfile
Symbolic link
1
linea/erigon/.#Dockerfile
Symbolic link
@@ -0,0 +1 @@
|
||||
root@shell.2982311:1653235805
|
||||
21
linea/erigon/Dockerfile
Normal file
21
linea/erigon/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM docker.io/library/golang:1.20-alpine3.17 AS builder
|
||||
RUN apk add --no-cache make g++ gcc musl-dev linux-headers git
|
||||
ARG ERIGON_VERSION=v2.48.1
|
||||
ARG ERIGON_REPOSITORY=https://github.com/ledgerwatch/erigon.git
|
||||
|
||||
RUN git clone --recurse-submodules -j8 $ERIGON_REPOSITORY
|
||||
|
||||
WORKDIR ./erigon
|
||||
|
||||
RUN git checkout ${ERIGON_VERSION}
|
||||
|
||||
RUN make erigon
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache ca-certificates curl jq libstdc++ libgcc
|
||||
COPY --from=builder /go/erigon/build/bin/erigon /usr/local/bin/
|
||||
|
||||
COPY ./scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod u+x /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
||||
15
linea/erigon/scripts/entrypoint.sh
Normal file
15
linea/erigon/scripts/entrypoint.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
# exit script on any error
|
||||
set -e
|
||||
|
||||
ERIGON_HOME=/root/.local/share/erigon
|
||||
|
||||
if [ ! -f "${ERIGON_HOME}/bootstrapped" ];
|
||||
then
|
||||
echo "write the custom genesis block"
|
||||
mkdir -p ${ERIGON_HOME:-/root/.local/share/erigon}
|
||||
erigon init --datadir ${ERIGON_HOME:-/root/.local/share/erigon} /configs/mainnet/shared/genesis.json
|
||||
fi
|
||||
|
||||
exec erigon $@
|
||||
Reference in New Issue
Block a user