info: add driver-type

With this patch:

    mkdir -p /etc/docker/
    echo '{"features":{"containerd-snapshotter":true}}' > /etc/docker/daemon.json
    dockerd

    docker info
    ...
    Storage Driver: overlayfs
     driver-type: io.containerd.snapshotter.v1
    Logging Driver: json-file

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-08-22 18:36:03 +02:00
parent d8d990f2e3
commit 774e25de13
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import (
"context"
"github.com/containerd/containerd"
"github.com/containerd/containerd/plugin"
"github.com/docker/docker/api/types"
"github.com/docker/docker/container"
"github.com/docker/docker/daemon/images"
@ -64,7 +65,10 @@ func (i *ImageService) GetLayerByID(cid string) (layer.RWLayer, error) {
// LayerStoreStatus returns the status for each layer store
// called from info.go
func (i *ImageService) LayerStoreStatus() [][2]string {
return [][2]string{}
// TODO(thaJeztah) do we want to add more details about the driver here?
return [][2]string{
{"driver-type", string(plugin.SnapshotPlugin)},
}
}
// GetLayerMountID returns the mount ID for a layer