Skip to content

docker: Refresh base images and trim runtime dependencies - #6701

Open
incrypto32 wants to merge 3 commits into
masterfrom
incrypto32/docker-base-refresh
Open

incrypto32 wants to merge 3 commits into
masterfrom
incrypto32/docker-base-refresh

Conversation

@incrypto32

Copy link
Copy Markdown
Contributor

The runtime base was pinned to a Nov 2024 Debian snapshot, so the image never picked up security updates, while the golang and rust build stages floated on rolling tags.

  • Pin all three bases by multi-arch index digest
  • Use libpq5 instead of libpq-dev in the runtime image. graph-node and graphman link libpq.so.5; the -dev package only adds headers and static libs, and pulled in libssl-dev with it
  • Add the docker ecosystem to dependabot so the pins stay current

Verified with a full source build: both binaries run, ldd fully resolved, nc still present for wait_for, and no dev packages left in the image.

The runtime base was frozen at the bookworm-20241111-slim snapshot, so the
image never picked up Debian security updates, while the golang and rust
build stages floated on rolling tags. Pin all three by multi-arch index
digest instead: reproducible builds, and dependabot can track the tags.
graph-node and graphman link libpq.so.5, which libpq5 provides. libpq-dev
only adds headers, libpq.a and pg_config, none of which the runtime image
uses, and it pulled in libssl-dev as a dependency.
@incrypto32
incrypto32 force-pushed the incrypto32/docker-base-refresh branch from 06ecfc1 to 8046822 Compare July 29, 2026 10:54
Keeps the pinned digests current so the runtime image picks up Debian
security updates instead of drifting behind again.
@incrypto32
incrypto32 force-pushed the incrypto32/docker-base-refresh branch from 8046822 to 89e6627 Compare July 29, 2026 11:13
@incrypto32
incrypto32 marked this pull request as ready for review July 29, 2026 13:27
matthewdarwin added a commit to pinax-network/graph-node that referenced this pull request Nov 20, 2026
Builds on graphprotocol#6701 (pinned digests, dependabot docker updates, no -dev
packages in the runtime) and goes one step further:

- golang, rust and debian bases move from bookworm to trixie, pinned by
  multi-arch digest (debian:trixie-slim is Debian 13.7).
- The runtime no longer installs libpq: graph-node and graphman reach
  Postgres through diesel-async/tokio-postgres and do not link libpq
  (ldd shows only libgcc_s, libm and libc), and OpenSSL is vendored.
  Only ca-certificates and netcat-openbsd (for wait_for) remain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant