You will need to save the Docker image as a tar file:
(您将需要将Docker映像另存为tar文件:)
docker save -o <path for generated tar file> <image name>
Then copy your image to a new system with regular file transfer tools such as cp
, scp
or rsync
(preferred for big files).
(然后使用常规文件传输工具(例如cp
, scp
或rsync
(对于大文件而言首选))将映像复制到新系统。)
After that you will have to load the image into Docker: (之后,您必须将映像加载到Docker中:)
docker load -i <path to image tar file>
PS: You may need to sudo
all commands.
(PS:您可能需要对所有命令进行sudo
。)
EDIT: You should add filename (not just directory) with -o, for example:
(编辑:您应该使用-o添加文件名(而不仅仅是目录),例如:)
docker save -o c:/myfile.tar centos:16
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…