美文网首页
docker image export

docker image export

作者: HaoDongZ | 来源:发表于2023-08-31 14:16 被阅读0次
#导出镜像
#!/bin/bash
docker images > images.txt
awk '{print $1}' images.txt > images_cut.txt
sed -i '1d' images_cut.txt
while read LINE
do
docker save $LINE > ${LINE//\//_}.train.tar
echo ok
done < images_cut.txt
echo finish

``bash

导入镜像

!/bin/bash

while read LINE
do
docker load -i $LINE
echo ok
done < tarname.txt
echo finish

```bash
#参考文档https://www.cnblogs.com/ksir16/p/8865525.html
#Docker小工具: runlike 和 whaler
pip install  runlike
runlike -p image #查看当前容器参数

相关文章

网友评论

      本文标题:docker image export

      本文链接:https://www.haomeiwen.com/subject/jpdzmdtx.html