FROM rockylinux:9 COPY ./scripts/init.sh /usr/local/bin/init.sh RUN chmod +x /usr/local/bin/init.sh ARG ABCORE_MAINNET_GETH_VERSION # Download and verify the geth binary from GitHub releases RUN set -eu; \ VERSION="${ABCORE_MAINNET_GETH_VERSION}"; \ BINARY="geth-${VERSION}"; \ URL="https://github.com/ABFoundationGlobal/abcore/releases/download/${VERSION}/${BINARY}"; \ SHA256_URL="${URL}.sha256"; \ echo "abcore: downloading geth binary from ${URL}"; \ curl -fsSL "${URL}" -o "/tmp/${BINARY}"; \ echo "abcore: downloading sha256 checksum from ${SHA256_URL}"; \ curl -fsSL "${SHA256_URL}" -o "/tmp/${BINARY}.sha256"; \ cd /tmp; \ sha256sum -c "${BINARY}.sha256" || (echo "abcore: SHA256 verification failed for ${BINARY}" >&2 && exit 1); \ chmod +x "${BINARY}"; \ mkdir -p /abcore/bin; \ mv "${BINARY}" /abcore/bin/geth; \ rm -f "${BINARY}" "${BINARY}.sha256" ENTRYPOINT [ "init.sh" ]