Skip to content

Commit

Permalink
System Nim is not supported by Nimbus team
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Jan 11, 2025
1 parent f4588f4 commit d0d7e65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
20 changes: 10 additions & 10 deletions nimbus/Dockerfile.source
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build Nimbus in a stock alpine container
FROM alpine:3 AS builder
# Build Nimbus in a stock Debian container
FROM debian:bookworm-slim AS builder

# Included here to avoid build-time complaints
ARG DOCKER_TAG
Expand All @@ -10,19 +10,19 @@ ARG DOCKER_VC_REPO
ARG BUILD_TARGET
ARG SRC_REPO

RUN apk update && apk add --no-cache make gcc musl-dev linux-headers git bash git-lfs nim
RUN apt-get update && apt-get install -y build-essential bash git-lfs

WORKDIR /usr/src
RUN bash -c "git clone --recurse-submodules -j8 ${SRC_REPO} nimbus-eth2 && cd nimbus-eth2 && git config advice.detachedHead false && git fetch --all --tags && if [[ ${BUILD_TARGET} =~ pr-.+ ]]; then git fetch origin pull/$(echo ${BUILD_TARGET} | cut -d '-' -f 2)/head:nim-pr; git checkout nim-pr; else git checkout ${BUILD_TARGET}; fi && make USE_SYSTEM_NIM=1 -j$(nproc) update && make USE_SYSTEM_NIM=1 -j$(nproc) nimbus_beacon_node nimbus_validator_client"
RUN bash -c "git clone --recurse-submodules -j8 ${SRC_REPO} nimbus-eth2 && cd nimbus-eth2 && git config advice.detachedHead false && git fetch --all --tags && if [[ ${BUILD_TARGET} =~ pr-.+ ]]; then git fetch origin pull/$(echo ${BUILD_TARGET} | cut -d '-' -f 2)/head:nim-pr; git checkout nim-pr; else git checkout ${BUILD_TARGET}; fi && make USE_SYSTEM_NIM=1 -j$(nproc) update && make -j$(nproc) nimbus_beacon_node nimbus_validator_client"

# Pull all binaries into a second stage deploy debian container
FROM alpine:3 AS consensus
FROM debian:bookworm-slim AS consensus

ARG USER=user
ARG UID=10002

RUN apk update && apk add \
ca-certificates bash tzdata git curl su-exec gcc
RUN apt-get update && apt-get install -y \
ca-certificates bash tzdata git curl gosu

# See https://stackoverflow.com/a/55757473/12429735RUN
RUN adduser \
Expand All @@ -47,13 +47,13 @@ USER ${USER}

ENTRYPOINT ["nimbus_beacon_node"]

FROM alpine:3 AS validator
FROM debian:bookworm-slim AS validator

ARG USER=user
ARG UID=10000

RUN apk update && apk add \
ca-certificates bash tzdata curl su-exec gcc
RUN apt-get update && apt-get install -y \
ca-certificates bash tzdata curl gosu

# See https://stackoverflow.com/a/55757473/12429735RUN
RUN adduser \
Expand Down
7 changes: 1 addition & 6 deletions nimbus/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

if [ "$(id -u)" = '0' ]; then
chown -R user:user /var/lib/nimbus
if command -v gosu &>/dev/null; then
__as_user=gosu
else
__as_user=su-exec
fi
exec ${__as_user} user docker-entrypoint.sh "$@"
exec gosu user docker-entrypoint.sh "$@"
fi

# Remove old low-entropy token, related to Sigma Prime security audit
Expand Down

0 comments on commit d0d7e65

Please sign in to comment.