Skip to content

docker: Move images to Debian trixie and drop libpq from the runtime - #6790

Open
matthewdarwin wants to merge 1 commit into
graphprotocol:masterfrom
pinax-network:graph-node/chore/docker-trixie
Open

matthewdarwin wants to merge 1 commit into
graphprotocol:masterfrom
pinax-network:graph-node/chore/docker-trixie

Conversation

@matthewdarwin

Copy link
Copy Markdown

Summary

Builds on #6701 (refresh base images, --no-install-recommends, dependabot docker updates) and moves the image to Debian trixie. Related: #6686.

  • golang:bookworm → golang:trixie, rust:bookworm → rust:trixie, debian:bookworm-20241111-slim → debian:trixie-slim (Debian 13.7), all pinned by multi-arch index digest; dependabot's docker ecosystem (from docker: Refresh base images and trim runtime dependencies #6701) keeps them current.
  • No libpq in the runtime at all. graph-node and graphman reach Postgres through diesel-async/tokio-postgres and don't link libpq: ldd on both binaries shows only libgcc_s, libm, libc and ld-linux, the same for the published v0.45.0 image, and there are no PQ* symbols. OpenSSL is vendored (store/postgres). The runtime installs only ca-certificates and netcat-openbsd (for wait_for). This also drops krb5/ldap/sasl: 81 packages vs 91 with libpq5 and 107 in v0.45.0.
  • rust-toolchain.toml (1.94.0) is still honoured: rustup in rust:trixie installs it during cargo build.

If you'd rather keep this in #6701, I'm happy to close this one — the trixie bases and the libpq removal are the only additions.

Testing

Built the graph-node and graph-node-debug targets from this branch and ran both it and the published graphprotocol/graph-node:v0.45.0 against postgres:17 (-E UTF8 --locale=C), ipfs/kubo and anvil (--block-time 1):

Test v0.45.0 this PR
ldd graph-node / graphman, nothing "not found" pass pass
graph-node --version / graphman --version 0.45.0 0.45.0
Migrations, container stays up pass pass
GraphQL on :8000, indexingStatuses on :8030 pass pass
graphman chain list (head advancing) pass pass
Deploy tests/integration-tests/base (built with graph-cli) via :8020, synced and healthy, entities queryable pass pass
graphman info pass pass
HTTPS RPC endpoint (TLS with only ca-certificates) — pass
ERRO/panic lines in logs 0 0
Debug target: gdb, perf, psql run, ldd resolves — pass

Trivy 0.76.1:

Image OS Critical High Fixable C+H
graphprotocol/graph-node:v0.45.0 Debian 12.8 6 247 141
trixie with libpq5 (#6701's runtime list) Debian 13.7 0 103 1
this PR Debian 13.7 0 47 1

The remaining fixable one is zlib1g CVE-2026-85091, already fixed in trixie-security and picked up by the next trixie-slim digest. perl-base stays (Essential, as discussed in #6686) at 5.40.1-6+deb13u1.

Notes, not changed here

  • Vendored OpenSSL is 3.5.0 (openssl-src 300.5.0+3.5.0, April 2025). It's compiled into the binaries, so OS-package scans can't see it; 3.5.x has had security releases since. That needs a Cargo.lock bump rather than a base-image change.
  • /etc/image-info records the base image's default rustc (1.100.0 here, 1.97.1 in v0.45.0) instead of the toolchain the build used (1.94.0), because that RUN runs outside the workspace. Pre-existing.

🤖 Generated with Claude Code

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 <[email protected]>

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