在 Docker 中,我们可以通过卷配置持久存储。在 Docker cli 中,我们使用“docker volume”:
$ docker volume --help
Usage: docker volume COMMAND
Manage volumes
Commands:
create Create a volume
inspect Display detailed information on one or more volumes
ls List volumes
prune Remove all unused local volumes
rm Remove one or more volumes
Run 'docker volume COMMAND --help' for more information on a command.
看起来 containerd cli (ctr) 没有等效项。他们确实有内容:
$ ctr content --help
NAME:
ctr content - manage content
USAGE:
ctr content command [command options] [arguments...]
COMMANDS:
active display active transfers
delete, del, remove, rm permanently delete one or more blobs
edit edit a blob and return a new digest
fetch fetch all content for an image into containerd
fetch-object retrieve objects from a remote
get get the data for an object
ingest accept content into the store
list, ls list all blobs in the store
push-object push an object to a remote
label add labels to content
OPTIONS:
--help, -h show help
还有截图:
$ ctr snapshot --help
NAME:
ctr snapshots - manage snapshots
USAGE:
ctr snapshots command [command options] [arguments...]
COMMANDS:
commit commit an active snapshot into the provided name
diff get the diff of two snapshots. the default second snapshot is the first snapshot's parent.
info get info about a snapshot
list, ls list snapshots
mounts, m, mount mount gets mount commands for the snapshots
prepare prepare a snapshot from a committed snapshot
remove, rm remove snapshots
label add labels to content
tree display tree view of snapshot branches
unpack unpack applies layers from a manifest to a snapshot
usage usage snapshots
view create a read-only snapshot from a committed snapshot
OPTIONS:
--snapshotter value snapshotter name. Empty value stands for the default value. [$CONTAINERD_SNAPSHOTTER]
--help, -h show help
哪个是等价的?我应该如何解释 ctr cli 输出的结果?