From bcbba3220189f4490c4c37ea11fdd40a3062e3f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E4=B8=83=E5=B9=B4=E5=A4=8F?= <2098833867@qq.com> Date: Sat, 27 Apr 2024 00:44:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dshell=E4=B8=AD=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E6=8C=87=E4=BB=A4=E5=8D=95=E8=AF=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker_shell.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker_shell.sh b/docker_shell.sh index 7278a11..e098be1 100644 --- a/docker_shell.sh +++ b/docker_shell.sh @@ -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