修复shell中一个指令单词错误

This commit is contained in:
洛洛希雅Lolosia 2024-04-27 00:44:14 +08:00
parent 3ed651670b
commit bcbba32201

View File

@ -11,12 +11,12 @@ echo '删除容器:' ${name}
docker rm ${name}
decare imageId=$(docker images -q --filter "reference=$name")
declare imageId=$(docker images -q --filter "reference=$name")
# 判断旧镜像是否存在
if [ -n "$imageId" ];then
decare imageId2=$(docker images -q --filter "reference=$name:old")
declare imageId2=$(docker images -q --filter "reference=$name:old")
# 判断之前是否还有其他的旧镜像
if [ -n "$imageId2" ];then