Skip to content

build(docker): bake image source label for GHCR repo linking#46

Merged
offendingcommit merged 1 commit into
mainfrom
build/dockerfile-source-label
May 29, 2026
Merged

build(docker): bake image source label for GHCR repo linking#46
offendingcommit merged 1 commit into
mainfrom
build/dockerfile-source-label

Conversation

@offendingcommit
Copy link
Copy Markdown
Owner

Why

The published web image isn't linked to the repo. The canonical, documented mechanism for container packages is a LABEL org.opencontainers.image.source baked into the image config — not the buildx/metadata-action annotations we'd been tuning.

Change

One line in the Dockerfile's runtime stage:

LABEL org.opencontainers.image.source="https://github.com/offendingcommit/openconcho"

Verified locally: docker inspect confirms the label is in the final image config.

Important: this links new packages, not the existing orphan

GHCR evaluates the source at package creation, not on every push. So:

  • Existing openconcho-web package (already orphaned): needs a one-time fix — either the manual Package settings → Connect repository UI step, or delete the package + re-publish (fresh creation auto-connects with this label). There's no REST endpoint to connect, so it can't be automated.
  • Future packages: auto-connect from this label, no manual step.

Type build → no version bump.

The canonical, build-tool-independent way GHCR links a container package
to its repo is a Dockerfile LABEL baked into the image config — not
buildx/metadata-action annotations. Add it so freshly-created packages
auto-connect.

Note: GHCR evaluates the source at package CREATION, so this links new
packages; an already-orphaned package needs a one-time manual connect
(or delete + re-publish) regardless.

Type build → no version bump.
@offendingcommit offendingcommit merged commit 3a22f8e into main May 29, 2026
2 checks passed
@offendingcommit offendingcommit deleted the build/dockerfile-source-label branch May 29, 2026 16:08
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