From 797d34ab9c20872763f25ca90c6f7a8e141fe6ff Mon Sep 17 00:00:00 2001 From: Korowa <113216393+korowant@users.noreply.github.com> Date: Thu, 5 Nov 2026 04:34:51 +0700 Subject: [PATCH 1/2] chore: drop unused Go and Foundry from the bedrock-init image The bedrock-init image installs a Go toolchain (~1 GB) and Foundry (~200 MB), but nothing in the image uses either: - scripts/init-bedrock.sh needs curl, tar, sha256sum, openssl and the downloader/extractor helpers in scripts/utils.sh - scripts/utils.sh needs aria2c (aria2), unzstd (zstd), lz4 and coreutils - grep across scripts/, docker/ and the repo history finds no cast, forge, anvil or go invocation - they were never referenced by any container-side script They look cargo-culted from the upstream simple-optimism-node template. Removing them shrinks every 'docker compose up --build' and drops a 'curl | bash' supply-chain step from the build. The apt line keeps the packages the scripts do use; git/wget/rsync/build-essential/python3 are also unused but small enough to leave for a follow-up. README updated: it claimed the container installs Foundry 'for its own image build', which is no longer true. progress.sh still needs cast on the host. --- README.md | 11 +++-------- docker/dockerfiles/Dockerfile.bedrock-init | 9 --------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index d36b421..e4acbc6 100644 --- a/README.md +++ b/README.md @@ -285,14 +285,9 @@ This removes all local chain and monitoring data. ### Estimate remaining sync time -`progress.sh` uses Foundry's `cast` on the host machine. - -The `bedrock-init` container installs Foundry for its own image build, but that -does not make `cast` available on your host shell. Install Foundry locally if -you want to use `progress.sh`. - -Install Foundry from [https://getfoundry.sh/](https://getfoundry.sh/) and then -run: +`progress.sh` uses Foundry's `cast`, which must be installed on your host +machine. Install Foundry from [https://getfoundry.sh/](https://getfoundry.sh/) +and then run: ```sh ./progress.sh diff --git a/docker/dockerfiles/Dockerfile.bedrock-init b/docker/dockerfiles/Dockerfile.bedrock-init index 38a4be0..b6290f8 100644 --- a/docker/dockerfiles/Dockerfile.bedrock-init +++ b/docker/dockerfiles/Dockerfile.bedrock-init @@ -5,12 +5,3 @@ ARG DEBIAN_FRONTEND=noninteractive # Install required packages. RUN apt-get update && apt install -y curl wget git rsync build-essential openssl python3 python3-pip aria2 zstd lz4 - -# Install Go. -RUN curl -sSL https://golang.org/dl/go1.21.6.linux-amd64.tar.gz | tar -v -C /usr/local -xz -RUN cp /usr/local/go/bin/go /usr/bin/go - -# Install Foundry. -RUN curl -L https://foundry.paradigm.xyz | bash -RUN /root/.foundry/bin/foundryup -RUN rsync -a /root/.foundry/bin/ /usr/bin/ From 2f60963d06b01f53a377da019bc2ad183356fef8 Mon Sep 17 00:00:00 2001 From: Korowa <113216393+korowant@users.noreply.github.com> Date: Fri, 13 Nov 2026 04:47:27 +0700 Subject: [PATCH 2/2] chore: trim the bedrock-init image to the packages the scripts use Follow-up to the Go/Foundry removal in this branch: the apt line still installed git, wget, rsync, build-essential, python3 and python3-pip, none of which any script calls. init-bedrock.sh needs curl, tar/sha256sum (base image), openssl; utils.sh needs aria2c, unzstd and lz4. Install only those, with --no-install-recommends and an apt list cleanup, and add ca-certificates explicitly since it is no longer pulled in implicitly - the snapshot download is HTTPS. --- docker/dockerfiles/Dockerfile.bedrock-init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/dockerfiles/Dockerfile.bedrock-init b/docker/dockerfiles/Dockerfile.bedrock-init index b6290f8..77e356c 100644 --- a/docker/dockerfiles/Dockerfile.bedrock-init +++ b/docker/dockerfiles/Dockerfile.bedrock-init @@ -4,4 +4,7 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive # Install required packages. -RUN apt-get update && apt install -y curl wget git rsync build-essential openssl python3 python3-pip aria2 zstd lz4 +# Only what the init scripts call: curl, openssl (JWT), aria2c (utils.sh +# download), unzstd/lz4 (utils.sh extractors) and coreutils/tar from the base +# image. git/wget/rsync/build-essential/python3 were unused. +RUN apt-get update && apt install -y --no-install-recommends curl ca-certificates openssl aria2 zstd lz4 && rm -rf /var/lib/apt/lists/*