Skip to content

Commit

Permalink
Reth binary build (eth-educators#1432)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne authored Jun 20, 2023
1 parent 7b564af commit a030619
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
4 changes: 2 additions & 2 deletions default.env
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ NIMEL_DOCKERFILE=Dockerfile.source
# Reth
# SRC build target can be a tag, a branch, or a pr as "pr-ID"
RETH_SRC_BUILD_TARGET=main
RETH_DOCKER_TAG=nonesuch
RETH_DOCKERFILE=Dockerfile.source
RETH_DOCKER_TAG=latest
RETH_DOCKERFILE=Dockerfile.binary

# staking-deposit-cli
# SRC build target can be a tag, a branch, or a pr as "pr-ID"
Expand Down
34 changes: 34 additions & 0 deletions reth/Dockerfile.binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ARG DOCKER_TAG
FROM ghcr.io/paradigmxyz/reth:${DOCKER_TAG}

# Unused, this is here to avoid build time complaints
ARG BUILD_TARGET

ARG USER=reth
ARG UID=10001

RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends \
ca-certificates \
tzdata \
gosu \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# See https://stackoverflow.com/a/55757473/12429735RUN
RUN adduser \
--disabled-password \
--gecos "" \
--shell "/sbin/nologin" \
--uid "${UID}" \
"${USER}"

RUN mkdir -p /var/lib/reth/ee-secret && chown -R ${USER}:${USER} /var/lib/reth && chmod -R 700 /var/lib/reth && chmod 777 /var/lib/reth/ee-secret

# Cannot assume buildkit, hence no chmod
COPY --chown=${USER}:${USER} ./docker-entrypoint.sh /usr/local/bin/
# Belt and suspenders
RUN chmod -R 755 /usr/local/bin/*

USER ${USER}

ENTRYPOINT ["reth", "node"]

0 comments on commit a030619

Please sign in to comment.