Git Product home page Git Product logo

Comments (1)

yveszoundi avatar yveszoundi commented on September 16, 2024

Nerdctl is a Docker compatible CLI for containerd. The concept of "snapshots" seems to be an integral part of how containerd works.

In order to create a container, the following must occur:

    The image and all its content must be loaded into the content store. This normally happens via download from the OCI registry, but you can load content in directly as well.
    Committed snapshots must be created from each layer of content for the image.
    An active snapshot must be created on top of the final layer of content for the image.

A container now can be created, with its root filesystem as the active snapshot.

Nerdctl directory layout

There are few interesting folders for Nerdctl "rootless" installations

  • ~/.config/containerd
  • ~/.local/share/nerdctl
  • ~/.local/share/containerd
    • io.containerd.runtime.v1.linux,
    • io.containerd.runtime.v2.task
    • io.containerd.snapshotter.v1.btrfs
    • io.containerd.snapshotter.v1.native
    • tmpmounts
    • io.containerd.metadata.v1.bolt
    • io.containerd.content.v1.content
    • io.containerd.snapshotter.v1.overlayfs

Nerdctl snapshotters

There are several "snapshotters" that work with nerdctl including the native one, stargz, fuse-overlayfs, just to name a few. Apparently there's a gRPC contract implementation for using a given "snapshotter plugin".

Compressing image blobs

It is possible to compress images with nerdctl really well (slow process)

nerdctl image convert --estargz --oci <originalname> <newname>

Sadly, compressing images sadly doesn't address any disk storage concerns after removing the original uncompressed image.

The snapshot is still present and it's essentially a duplicate copy of the unpacked image contents.
If using let's say the overlayfs snapshotter, we would have duplicated data in the snapshot folder.

  • ~/.local/share/containerd/io.containerd.content.v1.content
  • ~/.local/share/containerd/io.containerd.snapshotter.v1.overlayfs

from entrusted.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.