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

docker, BlobInfoCache: try to reuse compressed blobs from all known compressed digests #1461

Closed
wants to merge 1 commit into from

Commits on Feb 9, 2022

  1. docker, blobCache: try to reuse compressed blobs from all known compr…

    …essed digests
    
    It seems we try to reuse blobs only for the specified registry, however
    we can have valid known compressed digests across registry as well
    following pr attempts to use that by doing following steps.
    
    * Move all known blobs into common data scope i.e `all` instead of
      storing them in seperate registry.
    
    * Increase the sample set of potential blob reuse to all known
      compressed digests , also involving the one which do not belong to
    current registry.
    
    * If a blob is found match it against the registry where we are
      attempting to push. If blob is already there consider it a `CACHE
    HIT!` and reply skipping blob, since its already there.
    
    * Remove all images `buildah rmi --all` // needed so all new blobs can
      be tagged again in common bucket
    * Remove any previous `blob-info-cache` by
    
    ```console
    rm /home/<user>/.local/share/containers/cache/blob-info-cache-v1.boltdb
    ```
    
    ```console
    $ skopeo copy docker://registry.fedoraproject.org/fedora-minimal docker://quay.io/fl/test:some-tag
    $ buildah pull registry.fedoraproject.org/fedora-minimal
    $ buildah tag registry.fedoraproject.org/fedora-minimal quay.io/fl/test
    $ buildah push quay.io/fl/test
    ```
    
    ```console
    Getting image source signatures
    Copying blob a3497ca15bbf skipped: already exists
    Copying config f7e02de757 done
    Writing manifest to image destination
    Storing signatures
    ```
    
    Signed-off-by: Aditya R <arajan@redhat.com>
    flouthoc committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    82212e5 View commit details
    Browse the repository at this point in the history