Skip to content

docs(docker): push Docker Hub overviews for both images from the repo - #2446

Merged
thiras merged 2 commits into
mainfrom
docs/dockerhub-overview
Oct 12, 2026
Merged

thiras merged 2 commits into
mainfrom
docs/dockerhub-overview

Conversation

@thiras

@thiras thiras commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

What

Both Docker Hub pages (decdn/decdn-node, decdn/decdn) are blank. Hub does not read OCI labels, and the release mirror (docker buildx imagetools create) copies only the manifest.

  • Overview text in the repo: docker/README.<stage>.md, one per Dockerfile stage. Line 1 is the Hub short description (<!-- description: … -->, ≤100 chars); the rest is the overview: what the image is, quick start, tags, GHCR mirror, digest verification, links. Facts come from the Dockerfile, README § Install and SECURITY.md.
  • scripts/dockerhub-description.py (stdlib): reads each file at --ref, validates it before any request, logs in (POST /v2/auth/token), PATCHes both fields, and reads them back anonymously with retries. Every repo is tried; failures exit 1 with a one-line error:, never a traceback or the secret.
    • Credentials: DECDN_DOCKERHUB_USERNAME + DECDN_DOCKERHUB_TOKEN (a PAT) when both are set, else the docker login docker.io credential, looked up as docker does (a credHelpers entry or credsStore is final; a helper "not found" is a miss, any other helper failure is reported as such).
    • The PAT hint appears only on a 401/403 login.
  • sign-release.sh: for a stable release, pushes the overviews after the Docker Hub mirror, from the files at the tag. Prereleases leave them alone (same reason they never move latest). DECDN_SKIP_DOCKERHUB skips it. A failure only warns, at the failure and again at the end, with the re-run command — the overview never blocks a signed release.
  • Guards: check-image-name.sh fails an image with no overview file; the ci-tooling-tests path filter now includes docker/**, so an overview-only PR runs the format and absolute-link checks.
  • Docs: RELEASING.md (setup, publish steps, between-release edits with --ref origin/main, env vars), CHANGELOG.

Closes #2440

Reviewer notes

  • Pushing from the maintainer's machine, not a CI workflow, keeps RELEASING.md's rule that Actions holds no registry credential.
  • Nothing has been pushed to the live Hub yet. After merge, one manual run fills both pages now and is the first real check of the read-back comparison:
    scripts/dockerhub-description.py decdn/decdn-node=decdn-node decdn/decdn=decdn
  • The node overview states that metrics bind to 127.0.0.1 by default and names DECDN_METRICS_BIND=0.0.0.0; the Dockerfile's EXPOSE 9090 alone suggests otherwise.

Verification

  • uvx --with pyyaml pytest .github/scripts/tests scripts/tests -q → 246 passed. The new suite runs against a fake Hub on localhost with a scratch DOCKER_CONFIG and fake credential helpers; 7 hand mutations of the main fixes (credsStore fallthrough, byte vs char limit, login hint scope, helper failure as miss, env precedence, read-back field coverage, stop at first repo) are all caught.
  • .github/scripts/check-image-name.sh passes, and fails with the overview message when a file is removed.
  • shellcheck on both shell scripts; pre-commit run on every changed file.
  • Read-only checks against the live Hub API: endpoints match, anonymous GET is uncached (cf-cache-status: DYNAMIC).
  • User-visible change: CHANGELOG.md entry added
  • PR title uses an allowed type with a lowercase subject

🤖 Generated with Claude Code

Docker Hub does not read OCI labels, and the release mirror copies only
the manifest, so both Hub pages were blank. Each image's short
description and overview now live in docker/README.<stage>.md.
sign-release.sh pushes them through the Hub API after the mirror, from
the files at the tag, and reads them back without credentials. A
prerelease leaves them alone; a failed push only warns, and
scripts/dockerhub-description.py repeats it by hand.

The push reuses the maintainer's `docker login docker.io` credential,
or a PAT in DECDN_DOCKERHUB_USERNAME/DECDN_DOCKERHUB_TOKEN, so CI still
holds no registry credential. check-image-name.sh fails an image with
no overview, and the ci-tooling-tests filter now covers docker/**.

Closes #2440

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 12, 2026 16:49
@thiras thiras added kind:docs README, docs/, runbook, rustdoc or ADR prose only docker Dependabot: a Docker base-image update labels Oct 12, 2026
@thiras thiras self-assigned this Oct 12, 2026
@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

@github-code-quality

github-code-quality Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Code Coverage Overview

Languages: Rust, Solidity

Rust / code-coverage/cargo-llvm-cov

The overall line coverage in commit cd544d1 in the docs/dockerhub-overv... branch remains at 75%, unchanged from commit 21c06e1 in the main branch.

Show a line coverage summary of the most impacted files.
File main 21c06e1 docs/dockerhub-overv... cd544d1 +/-
crates/cli/src/...ommands/node.rs 60% 59% -1%
crates/client/src/lib.rs 88% 88% 0%
crates/client/s...undle/engine.rs 61% 61% 0%
crates/node/src...gin/pull_leg.rs 85% 85% 0%
crates/node/src/dht/publish.rs 78% 80% +2%

Solidity / code-coverage/forge

The overall line coverage in commit cd544d1 in the docs/dockerhub-overv... branch remains at 92%, unchanged from commit 21c06e1 in the main branch.


Updated October 12, 2026 17:12 UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The API override can send privileged Docker Hub credentials to an arbitrary HTTPS host.

3 open findings
What changed in this PR

Adds repository-managed Docker Hub descriptions and publishes them during stable releases.

Changes:

  • Adds validated overview content for both images.
  • Adds Docker Hub authentication, update, and read-back tooling.
  • Integrates publishing, documentation, CI guards, and tests.
File Description
scripts/​dockerhub-description.py Pushes and verifies Docker Hub metadata.
scripts/​tests/​test_dockerhub_description.py Tests validation, credentials, publishing, and read-back.
scripts/​sign-release.sh Publishes overviews during stable releases.
docker/​README.decdn.md Defines the CLI image overview.
docker/​README.decdn-node.md Defines the node image overview.
RELEASING.md Documents setup and recovery procedures.
CHANGELOG.md Records the user-visible release change.
.github/​workflows/​ci.yml Runs tooling checks for overview changes.
.github/​scripts/​check-image-name.sh Requires an overview for each image.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/dockerhub-description.py Resolved
Comment thread scripts/dockerhub-description.py Resolved
- DECDN_DOCKERHUB_API accepts only https://hub.docker.com or a loopback
  test server, so a stray exported value cannot receive the token.
- A credential helper or overview file that is not UTF-8 fails with an
  `error:` line instead of a UnicodeDecodeError traceback.
- The hung-helper test clears exported DECDN_/DOCKER_ variables, so a
  maintainer's own token cannot bypass the helper under test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thiras
thiras merged commit 2bec66c into main Oct 12, 2026
31 checks passed
@thiras
thiras deleted the docs/dockerhub-overview branch October 12, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Dependabot: a Docker base-image update kind:docs README, docs/, runbook, rustdoc or ADR prose only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(docker): Docker Hub overview is empty for decdn/decdn-node and decdn/decdn

2 participants