Remote snapshotter extension for containerd
Snapshots crate implements containerd's proxy plugin for snapshotting. It aims hide the underlying complexity of GRPC
interfaces, streaming, and request/response conversions and provide one Snapshots
trait to implement.
Proxy plugins
A proxy plugin is configured using containerd's config file and will be loaded alongside the internal plugins when containerd is started. These plugins are connected to containerd using a local socket serving one of containerd's GRPC API services. Each plugin is configured with a type and name just as internal plugins are.
How to use from containerd
Add the following to containerd's configuration file:
[]
[]
= "snapshot"
= "/tmp/snap2.sock"
Start daemons and try pulling an image with custom
snapshotter:
# Start containerd daemon
# Run remote snapshotter instance
# Now specify the snapshotter when pulling an image
Getting started
Snapshotters are required to implement Snapshotter
trait (which is very similar to containerd's
Snapshotter interface).
;
The library provides snapshots::server
for convenience to wrap the implementation into a GRPC server, so it can
be used with tonic
like this:
use Server;
builder
.add_service
.serve_with_incoming
.await
.expect;