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

container: Add support for re-exporting a fetched container #642

Merged
merged 2 commits into from
Jun 21, 2024

Commits on Jun 19, 2024

  1. chunking: Add some doc comments

    Just a drive by.
    cgwalters committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    dfcea4a View commit details
    Browse the repository at this point in the history
  2. container: Add support for re-exporting a fetched container

    The status quo today is basically that with a "pure ostree"
    container image, one can pull it, and one *can* re-export
    it with `ostree container encapsulate`...but doing so
    loses *all chunking* i.e. you end up with a single
    giant layer again.
    
    Further, we don't support exporting derived images at all.
    
    Fix both of these with a new CLI and API, for example:
    
    ```
    $ ostree container image reexport --repo=/path/to/repo registry:quay.io/exampleos/someos:latest containers-storage:localhost/exampleos
    ```
    
    Now...before one gets too excited, this is still suboptimal
    in a bunch of ways:
    
    - Copying to `containers-storage` is super inefficient, we indirect
      through a local `oci` directory because of the lack of "push"
      support in containers-image-proxy, *and* we end up with a full
      physical copy of the files even when we *could* reflink;
      cc containers/storage#1849
    - Because we don't currently save tar-split data, the use
      case of pushing to a registry is virtually guaranteed to produce
      changed diffids, and we'll hence end up duplicating layers
      on the registry
    
    Now what is more interesting is that this code is going to help
    us a bit for the use case of "recommitting" a derived container
    image.
    
    Signed-off-by: Colin Walters <walters@verbum.org>
    cgwalters committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    4374c05 View commit details
    Browse the repository at this point in the history