forked from github/dataease
fix: 调整 dectl 清理旧镜像时的判断逻辑
This commit is contained in:
parent
df5d98927e
commit
f278343998
@ -301,7 +301,7 @@ function clear_images() {
|
||||
component_version=$(echo ${component_image_defined} | awk -F":" '{print $3}' | uniq)
|
||||
component_image=$(echo ${component_image_defined} | awk -F'image: ' '{print $2}' | awk -F':' '{print $1}')
|
||||
|
||||
if test -z $(docker images | grep "$component_image" | grep -v " $component_version "); then
|
||||
if [[ $(docker images | grep "$component_image" | grep -v " $component_version ") == 0 ]]; then
|
||||
echo "$component_image 不存在旧版本镜像"
|
||||
else
|
||||
echo "存在旧版本镜像 : "
|
||||
|
Loading…
Reference in New Issue
Block a user