Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for OCI Image Manifest #261

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Feb 10, 2024

  1. API error: improve error message

    Previously, a generic error would be returned:
    ```
    Error: unexpected HTTP status 404 Not Found
    ```
    
    This does not convey much information as to what happens.
    On the current version of dkregistry, one would hit this when trying to
    access s390x/ubuntu on registry-1.docker.io.
    
    This change specializes the error to surface more information as to why the
    error is happening as described in the OCI Distribution Specification:
    https://github.com/opencontainers/distribution-spec/blob/main/spec.md#error-codes
    
    In this specific case, the error would look like:
    ```
    Error: Api Error: ((MANIFEST_UNKNOWN), message: OCI manifest found, but accept header does not support OCI manifests)
    
    Caused by:
        ((MANIFEST_UNKNOWN), message: OCI manifest found, but accept header does not support OCI manifests)
    ```
    
    which clearly highlight that dkregistry does not support OCI manifest.
    chantra committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    8b2f432 View commit details
    Browse the repository at this point in the history
  2. Add support for OCI Image Manifest

    Image like s390x/ubuntu uses OCI Image Manifest, which per
    https://github.com/opencontainers/image-spec/blob/v1.0.1/manifest.md
    is very similar to vnd.docker.distribution.manifest.v2.
    
    Add a test to confirm we can deserialize an OCI Image Manifest as a ManifestSchema2Spec.
    
    Also add a test to confirm that we can now fetch the manifest from docker.io.
    Previously it would fail with MANIFEST_UNKNOWN.
    chantra committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    1d779db View commit details
    Browse the repository at this point in the history
  3. Add support for OCI Image Index

    OCI Image Index (https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md)
    is similar to vnd.docker.distribution.manifest.list.v2
    
    This revives camallo#244 originally created by @luizribeiro
    
    A testing client could pull koenkk/zigbee2mqtt:latest with this change.
    
    Fixes camallo#243
    chantra committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    035f1a5 View commit details
    Browse the repository at this point in the history