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

Switch Lodestar docker build to debian #1891

Merged
merged 3 commits into from
Aug 8, 2024
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
2 changes: 1 addition & 1 deletion lodestar/Dockerfile.binary
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${DOCKER_REPO}:${DOCKER_TAG}
ARG BUILD_TARGET
ARG SRC_REPO

RUN apk update && apk add --no-cache ca-certificates tzdata bash su-exec git && rm -rf /var/cache/apk/*
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tzdata bash gosu git && apt-get clean && rm -rf /var/lib/apt/lists/*

ARG USER=lsconsensus
ARG UID=10002
Expand Down
8 changes: 4 additions & 4 deletions lodestar/Dockerfile.source
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:22-alpine AS builder
FROM node:22.4-slim AS builder

# Here only to avoid build-time errors
ARG DOCKER_TAG
Expand All @@ -7,7 +7,7 @@ ARG DOCKER_REPO
ARG BUILD_TARGET
ARG SRC_REPO

RUN apk update && apk add --no-cache git g++ make python3 py3-setuptools bash && rm -rf /var/cache/apk/*
RUN apt-get update && apt-get install -y --no-install-recommends git g++ make python3 python3-setuptools bash && apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /usr/app

Expand All @@ -16,9 +16,9 @@ RUN bash -c "cd .. && rm -rf app && git clone ${SRC_REPO} app && cd app && git c
&& if [[ ${BUILD_TARGET} =~ pr-.+ ]]; then git fetch origin pull/$(echo ${BUILD_TARGET} | cut -d '-' -f 2)/head:ls-pr; git checkout ls-pr; else git checkout ${BUILD_TARGET}; fi \
&& yarn install --non-interactive --frozen-lockfile && yarn build"

FROM node:22-alpine
FROM node:22.4-slim

RUN apk update && apk add --no-cache ca-certificates tzdata bash su-exec git && rm -rf /var/cache/apk/*
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tzdata bash gosu git && apt-get clean && rm -rf /var/lib/apt/lists/*

ARG USER=lsconsensus
ARG UID=10002
Expand Down
2 changes: 1 addition & 1 deletion lodestar/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -Eeuo pipefail

if [ "$(id -u)" = '0' ]; then
chown -R lsvalidator:lsvalidator /var/lib/lodestar
exec su-exec lsvalidator docker-entrypoint.sh "$@"
exec gosu lsvalidator docker-entrypoint.sh "$@"
fi

if [[ "${NETWORK}" =~ ^https?:// ]]; then
Expand Down
2 changes: 1 addition & 1 deletion lodestar/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [ "$(id -u)" = '0' ]; then
chown -R lsconsensus:lsconsensus /var/lib/lodestar
exec su-exec lsconsensus docker-entrypoint.sh "$@"
exec gosu lsconsensus docker-entrypoint.sh "$@"
fi

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