Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reth binary build #1432

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]