有没有办法以Docker内部(例如overlayfs2)存储格式存储Docker镜像,而不使用Docker守护进程本身?使用案例是将Docker镜像预安装到根文件系统上,而不会有太多依赖项。
我经常使用skopeo,它支持“containers storage:”存储库类型。这种存储库类型是通过storage.conf配置的,它有一个覆盖文件系统驱动程序。然而,这与Docker中使用的overlayfs格式(存储在/var/lib/docker/overlay2下的格式)相同吗?
发布于 2019-08-30 04:08:53
您可以将docker图像保存为tar文件docker save [docker image] > filename.tar
发布于 2019-11-19 00:24:54
你可以这样做:
~ $ skopeo copy docker://docker.io/library/alpine:latest containers-storage:localhost/alpine:latest
Getting image source signatures
Copying blob 89d9c30c1d48 done
Copying config 965ea09ff2 done
Writing manifest to image destination
Storing signatures
~ $ buildah images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/alpine latest 965ea09ff2eb 3 weeks ago 5.82 MBhttps://stackoverflow.com/questions/57716086
复制相似问题