shell_002_for循环_批量导入docker镜像
#!/bin/bashcd /root/k8s-install/kubeadm-basic.images/ls /root/k8s-install/kubeadm-basic.images/ | grep -v load-images.sh > /tmp/k8s-images.txtfor i in $( cat/tmp/k8s-images.txt )dodo...
·
#!/bin/bash
ls . | grep -v load-images.sh > /tmp/k8s-images.txt
for i in $( cat /tmp/k8s-images.txt )
do
docker load -i $i
done
rm -rf /tmp/k8s-images.txt
cd /root/k8s-install/DIR_NAME && sh /root/k8s-install/DIR_NAME/load-images.sh
等同于
ls *.tar | xargs -i docker load -i {}
更多推荐
已为社区贡献3条内容
所有评论(0)