Lazypullslides
Lazypullslides
container can’t start before the all layers become locally available
bin/bash
● Non seekable
bin/ls
• Need to scan the entire blob even for
etc/passwd extracting single file entry
etc/group
usr/bin/apt
● No parallel extraction
• Need to scan sequentially
・・・
OCI-alternative accelerated images and lazy pulling
Lazy pulling:
Starting up containers without waiting for the pull completion
● eStargz
• Lazy pullable format with prefetch optimization + content verification
• Proposed as a backward-compatible extension to OCI Image Spec
● Nydus
• Lazy pullable format with prefetch, chunk dedup and e2e data integrity
• Compatible with OCI Distribution Spec and Artifacts Spec
• Proposed as OCI “v2” format (incompatible to current OCI Image Spec)
eStargz
Kohei Tokunaga, NTT Corporation
eStargz: Standard-compatible lazy pulling
● 100% OCI-compatible
• Lazy pullable from standard registries (ghcr.io, docker.io, …etc)
• Even legacy (lazy-pulling-agnostic) runtime can run eStargz
[sec]
● k3s supports lazy pulling of eStargz (merged to the main, will be included in k3s v1.22)
$ k3s server --snapshotter=stargz
eStargz
Node
Container Registry
container
eStargz
proc
Stargz
Lazy pull Snapshotter
Node
Container Registry
container
Podman, CRI-O
eStargz
proc
Stargz Store
Lazy pull
Lazy pull RUN go build -o hello /hello.go COPY and RUN without waiting for the pull completion
Kaniko: https://github.com/GoogleContainerTools/kaniko
● Image builder runnable in containers and Kubernetes
● Requires GGCR_EXPERIMENT_ESTARGZ=1
● Base images need to be eStargz
nerdctl: https://github.com/containerd/nerdctl/blob/v0.11.1/docs/stargz.md
● Docker-compatible CLI for containerd
● Can be combined with nerdctl build command
$ nerdctl image convert --estargz --oci ghcr.io/ktock/foo:1 ghcr.io/ktock/foo:1-esgz
• download image from remote registry, convert it to nydus image, and push nydus
image to remote registry
• build nydus image directly from dockerfile and push it to remote registry
● https://github.com/goharbor/community/pull/167
● https://github.com/opencontainers/artifacts/pull/29
● eStargz
• Backward compatibility
• Extension to the existing OCI image spec
● Nydus
• Future looking
• Proposal to the next generation OCI image spec
eStargz Project Information
● github: https://github.com/containerd/stargz-snapshotter
● github: https://github.com/dragonflyoss/image-service
● slack: https://tinyurl.com/nydus-slack
● tutorial: https://tinyurl.com/nydus-tutorial
Thank You
&
Questions!