Foundation for removing go-containerregistry dependency#69
Draft
Foundation for removing go-containerregistry dependency#69
Conversation
Added internal/oci package with: - v1: Core OCI types (Hash, Descriptor, Manifest, Layer, Image interfaces) - v1/types: Media type constants - v1/partial: Helper functions for partial images - name: Reference parsing using distribution/reference These packages provide drop-in replacements for go-containerregistry types using opencontainers/image-spec and moby/docker libraries. Co-authored-by: ericcurtin <1694275+ericcurtin@users.noreply.github.com>
Co-authored-by: ericcurtin <1694275+ericcurtin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove go-containerregistry dependency and use moby
Foundation for removing go-containerregistry dependency
Nov 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces Google's go-containerregistry with moby/docker ecosystem libraries. The project currently uses go-containerregistry across 60+ files for OCI image handling, registry operations, and reference parsing.
Changes
Created OCI compatibility layer (
internal/oci/)v1/- Core OCI types (Hash, Descriptor, Manifest, Layer, Image interfaces) usingopencontainers/image-specv1/types/- MediaType constants for OCI and Docker image formatsv1/partial/- Helper functions (Digest, ConfigName, Size, ConfigLayer)name/- Reference parsing usingdistribution/reference(moby)All packages provide drop-in API compatibility with go-containerregistry.
Implementation guide
Added
docs/REMOVE_GO_CONTAINERREGISTRY.mdwith:Remaining work
Phase 1: Registry client using
containerd/remotes/dockerPhase 2-4: Migrate 60+ files to use
internal/oci/*Phase 5: Remove go-containerregistry from go.mod
Example migration:
This PR establishes the architecture and provides working foundation types. The systematic migration follows incrementally to maintain test coverage and functionality.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.