[英]What is the equivalent of docker volumes in containerd?
在 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 输出的结果?
来自: https://containerd.io/scope/
containerd 被设计为嵌入到更大的系统中,因此它只包含一个专门用于开发和调试目的的准系统 CLI (ctr),没有要求人性化,也不能保证界面随时间的稳定性。
看看runc
: https://danishpraka.sh/2020/07/24/introduction-to-runc.html
运行时规范
在使用 docker 运行容器时指定配置选项(例如卷挂载、memory 限制或 uid:gid 映射)就像为 Z05B6053C41A2130AFD6FC3B158BDA4E6 命令指定命令行选项一样简单。 在使用 runc 时,这些配置将作为文件传递给 runc。 此配置文件,即运行时规范,是由开放容器倡议 (OCI) 制定的配置标准,用于指定容器的选项,并由 runc[2] 使用。 简而言之,运行时规范是一个名为 config.json 的 JSON 文件,其中包含与特定容器相关的配置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.