我的windowns PC上有本地镜像
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
52f36432c9a7 visionai/clouddream:latest "/bin/bash" Less than a second ago Up 3 minutes
现在,我想将其导出到tar,因此请保存在闪存盘中,然后再加载到Mac中。
我尝试这些,但不起作用:
$ docker save -o visionai/clouddream clouddream.tar
Error response from daemon: No such image: clouddream.tar
和
$ docker export visionai/clouddream > clouddream.tar
Error response from daemon: No such container: visionai/clouddream
最佳答案
您反转了docker save的参数:
docker save -o clouddream.tar visionai/clouddream
docker export导出一个容器,但是您正在尝试导出图像,因此它无法工作