diff --git a/beacon-chain/Dockerfile b/beacon-chain/Dockerfile index 4f5a5c6..2031b9e 100644 --- a/beacon-chain/Dockerfile +++ b/beacon-chain/Dockerfile @@ -1,3 +1,6 @@ +FROM --platform=$TARGETPLATFORM alpine:3.20 AS curl-stage +RUN apk add --no-cache curl + ARG UPSTREAM_VERSION FROM sigp/lighthouse:${UPSTREAM_VERSION} @@ -16,9 +19,8 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh ADD ${STAKER_SCRIPTS_URL}/consensus_tools.sh /etc/profile.d/ -RUN rm -rf /var/lib/apt/lists/* && \ - apt-get update && apt-get --yes install curl && apt-get clean && \ - chmod +rx /usr/local/bin/entrypoint.sh /etc/profile.d/consensus_tools.sh +COPY --from=curl-stage /usr/bin/curl /usr/bin/curl +RUN chmod +rx /usr/local/bin/entrypoint.sh /etc/profile.d/consensus_tools.sh # This env changes the variant # Placed at the end to regenerate the least amount of layers diff --git a/validator/Dockerfile b/validator/Dockerfile index 3f231ef..3c49516 100644 --- a/validator/Dockerfile +++ b/validator/Dockerfile @@ -1,3 +1,6 @@ +FROM --platform=$TARGETPLATFORM alpine:3.20 AS curl-stage +RUN apk add --no-cache curl + ARG UPSTREAM_VERSION FROM sigp/lighthouse:${UPSTREAM_VERSION} @@ -15,9 +18,8 @@ ENV VALIDATOR_PORT=3500 \ ADD ${STAKER_SCRIPTS_URL}/consensus_tools.sh /etc/profile.d/ -RUN rm -rf /var/lib/apt/lists/* && \ - apt-get update && apt-get --yes install curl && apt-get clean && \ - chmod +rx /usr/local/bin/entrypoint.sh /etc/profile.d/consensus_tools.sh +COPY --from=curl-stage /usr/bin/curl /usr/bin/curl +RUN chmod +rx /usr/local/bin/entrypoint.sh /etc/profile.d/consensus_tools.sh # This env changes the variant # Placed at the end to regenerate the least amount of layers