#!/bin/bash
Doc_Ima_1=(`docker images |awk '{print $1}' |tr "\n" " "`)
Doc_Ima_2=(`docker images |awk '{print $2}' | tr "\n" " "`)
Doc_Ima_4=(`docker images |awk '{print $4}' | tr "\n" " "`)
Doc_Ima_i=${#Doc_Ima_1[@]}
declare -A map=()
for (( i=0 ; i<$Doc_Ima_i ; i++ )) ; do
if [[ ! -z ${map[${Doc_Ima_1[$i]}]} ]] ; then
continue
else
map[${Doc_Ima_1[$i]}]=${Doc_Ima_2[$i]}${Doc_Ima_4[$i]}
fi
done
for key in ${!map[@]}
do
echo "$key:${map[$key]}"|grep -v "none"
done
shell docker 镜像推送的使用
最新推荐文章于 2024-04-07 06:45:56 发布