管理 容器运行时 Containerd
# --address value, -a value 指定 containerd's GRPC server,默认 /run/containerd/containerd.sock #查看命名空间 ctr namespace ls # 查看 K8S 命名空间下的镜像 ctr -n k8s.io images ls # 下载镜像 ctr images pull docker.io/library/redis:alpine # 创建 container ctr c create docker.io/library/redis:alpine redis-container # 查看 ctr c ls # 后台启动 ctr t start -d redis-container # 查看 container ctr t ls # 查看 k8s 中正在运行的容器 ctr -n k8s.io task ls # 打tag ctr images tag docker.io/library/redis:alpine harbor.junengcloud.com/tmp/redis:alpine # push 上传镜像 ctr images push harbor.junengcloud.com/tmp/redis:alpine # 注意可能会出现 ctr: content digest sha256:xxxxxx not found,解决办法,下载完整的 ctr image pull --all-platforms docker.io/library/redis:alpine ctr images rm harbor.junengcloud.com/tmp/redis:alpine ctr images tag docker.io/library/redis:alpine harbor.junengcloud.com/tmp/redis:alpine ctr images push harbor.junengcloud.com/tmp/redis:alpine # 离线导入 docker 镜像,在其他 docker 上导出, containerd 镜像导入 docker save -o rabbitmq_3.7.8.tar harbor.junengcloud.com/rabbitmq/rabbitmq:3.7.8 ctr images import rabbitmq_3.7.8.tar ctr images ls -q
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)