Skip to content

chore: drop unused Go and Foundry from the bedrock-init image - #100

Open
feafel wants to merge 2 commits into
inkonchain:mainfrom
feafel:chore/drop-unused-go-foundry
Open

feafel wants to merge 2 commits into
inkonchain:mainfrom
feafel:chore/drop-unused-go-foundry

Conversation

@feafel

@feafel feafel commented Nov 4, 2026

Copy link
Copy Markdown

What

Removes the Go toolchain and Foundry from docker/dockerfiles/Dockerfile.bedrock-init:

-# 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/

and updates the README sentence that claimed the container installs Foundry.

Why

Nothing in the image uses either toolchain:

consumer what it actually needs
scripts/init-bedrock.sh curl, tar, sha256sum, openssl, mkdir, dirname
scripts/utils.sh aria2c (aria2), unzstd (zstd), lz4, 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 this repo was forked from.

Effect: every docker compose up --build builds a smaller image (~1.2 GB less to pull/extract on first boot, which matters because the first boot is already dominated by a 250-400 GB snapshot download), and the build loses a curl | bash step that fetched a third-party installer.

progress.sh still needs cast, but it runs on the host — that is unchanged and the README now says so directly.

Verification

  • no references to the removed toolchains anywhere in the repo (git grep -nE '\b(cast|forge|anvil)\b' over tracked files → only progress.sh, which is host-side)
  • docker-compose.yml untouched; the image still installs everything init-bedrock.sh/utils.sh call
  • YAML files parse; README wording updated

Not verified: an actual docker build (no Docker in this environment) — the change only deletes two RUN blocks that nothing depends on.

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.
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.
@feafel
feafel force-pushed the chore/drop-unused-go-foundry branch from 38c438f to 2f60963 Compare November 12, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants