Docker Save(Load)或Export(Import)
export/import与 save/load区别
export/import 是根据容器来导出镜像(因此没有镜像的历史记录)而 save/load 操作的对象是镜像
export/import 镜像的历史记录再导后无法进行回滚操作,而save/load镜像有完整的历史记录可以回滚
Save镜像
docker save -o /home/dyufei/tensorflow.tar tensorflow/tensorflow
或者
docker save tensorflow/tensorflow > /home/dyufei/tensorflow.tar
Load镜像
docker load -i tensorflow.tar
导出容器的镜像
docker export tensorboard > /home/dyufei/tensorflow_tensorboard.tar
或者
docker export -o /home/dyufei/tensorflow_tensorboard.tar tensorboard
导入容器的镜像
sudo docker import - /home/dyufei/tensorflow_tensorboard.tar