From a33cb74269b849d5cdff203ecbed17580e99b4b6 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Tue, 25 Jun 2024 01:56:05 +0800 Subject: [PATCH] add missing files --- .../Dockerfile | 25 +++++++++++++++++++ .../cerc-fixturenet-plugeth-plugeth/build.sh | 13 ++++++++++ .../cerc-plugeth-statediff/build.sh | 8 ++++++ .../container-build/cerc-plugeth/build.sh | 8 ++++++ 4 files changed, 54 insertions(+) create mode 100644 stack-orchestrator/container-build/cerc-fixturenet-plugeth-plugeth/Dockerfile create mode 100755 stack-orchestrator/container-build/cerc-fixturenet-plugeth-plugeth/build.sh create mode 100755 stack-orchestrator/container-build/cerc-plugeth-statediff/build.sh create mode 100755 stack-orchestrator/container-build/cerc-plugeth/build.sh diff --git a/stack-orchestrator/container-build/cerc-fixturenet-plugeth-plugeth/Dockerfile b/stack-orchestrator/container-build/cerc-fixturenet-plugeth-plugeth/Dockerfile new file mode 100644 index 0000000..5ae55af --- /dev/null +++ b/stack-orchestrator/container-build/cerc-fixturenet-plugeth-plugeth/Dockerfile @@ -0,0 +1,25 @@ +FROM cerc/fixturenet-eth-genesis-postmerge:local as fnetgen + +# Using the same golang image as used to build geth: https://github.com/cerc-io/go-ethereum/blob/HEAD/Dockerfile +FROM golang:1.21-alpine as delve +RUN go install github.com/go-delve/delve/cmd/dlv@latest + +FROM cerc/plugeth-statediff:local as statediff +# FIXME: fork of plugeth, use stock after upstreaming patches +FROM cerc/plugeth:local as geth + +FROM alpine:3.17 + +RUN apk add --no-cache bash wget python3 bind-tools postgresql-client + +COPY run-el.sh /opt/testnet/run.sh + +COPY --from=delve /go/bin/dlv /usr/local/bin/ +COPY --from=geth /usr/local/bin/geth /usr/local/bin/ +COPY --from=fnetgen /opt/genesis /opt/testnet +COPY --from=statediff /usr/local/lib/statediff.so /usr/local/lib/plugeth/ + +# Initialize the geth db with our config +RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey + +ENTRYPOINT ["/opt/testnet/run.sh"] diff --git a/stack-orchestrator/container-build/cerc-fixturenet-plugeth-plugeth/build.sh b/stack-orchestrator/container-build/cerc-fixturenet-plugeth-plugeth/build.sh new file mode 100755 index 0000000..6074ed1 --- /dev/null +++ b/stack-orchestrator/container-build/cerc-fixturenet-plugeth-plugeth/build.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Build cerc/fixturenet-plugeth-plugeth +set -x + +source ${CERC_CONTAINER_BASE_DIR}/build-base.sh + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +if [ ! -e "${SCRIPT_DIR}/run-el.sh" ]; then + cp -fp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/run-el.sh ${SCRIPT_DIR}/ +fi + +docker build -t cerc/fixturenet-plugeth-plugeth:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR diff --git a/stack-orchestrator/container-build/cerc-plugeth-statediff/build.sh b/stack-orchestrator/container-build/cerc-plugeth-statediff/build.sh new file mode 100755 index 0000000..447c8d0 --- /dev/null +++ b/stack-orchestrator/container-build/cerc-plugeth-statediff/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Build cerc/plugeth-statediff +source ${CERC_CONTAINER_BASE_DIR}/build-base.sh +# Pass Go auth token if present +if [[ -n "${CERC_GO_AUTH_TOKEN}" ]]; then + build_command_args="${build_command_args} --build-arg GIT_VDBTO_TOKEN=${CERC_GO_AUTH_TOKEN}" +fi +docker build -t cerc/plugeth-statediff:local ${build_command_args} ${CERC_REPO_BASE_DIR}/plugeth-statediff diff --git a/stack-orchestrator/container-build/cerc-plugeth/build.sh b/stack-orchestrator/container-build/cerc-plugeth/build.sh new file mode 100755 index 0000000..cd98c5c --- /dev/null +++ b/stack-orchestrator/container-build/cerc-plugeth/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Build cerc/plugeth +source ${CERC_CONTAINER_BASE_DIR}/build-base.sh +# Pass Go auth token if present +if [[ -n "${CERC_GO_AUTH_TOKEN}" ]]; then + build_command_args="${build_command_args} --build-arg GIT_VDBTO_TOKEN=${CERC_GO_AUTH_TOKEN}" +fi +docker build -t cerc/plugeth:local ${build_command_args} ${CERC_REPO_BASE_DIR}/plugeth