Skip to content

Provide the official images in the stargz format #13123

Open
@gabrieldemarmiesse

Description

@gabrieldemarmiesse

Hi!

With buildx and buildkit, it's possible to leverage Docker image in the stargz format. It's now even easier since Docker Desktop added support for containerd as the image store in beta, with the stargz snapshotter preinstalled.

This allow for much, much faster start of containers and could be a game changer in CI/CD where a lot of time is spent pulling images. Overall it's a net win for the user experience in general as docker pulls are much faster.

Docker image in the stargz format are backward compatible as the format is OCI-complient. See https://github.com/containerd/stargz-snapshotter

It's possible to build and push stargz Docker image by using buildkit and buildx. By using the option: compression=estargz,oci-mediatypes=true and optionally force-compression=true if the base image is not in the stargz format.

See https://github.com/moby/buildkit/blob/master/docs/stargz-estargz.md#creating-stargzestargz-images for more information about stargz and buildkit.

It's backward compatible so shouldn't be an issue to build all the new Docker images with this format, but we can be careful and for a time provide a new suffix -esgz for users who want to try lazy pulling with stargz. This doubles the number of images build but ensure maybe a smoother path to stargz while bugs are flushed out of the buildkit exporter (if any)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions