mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix: 调整 dectl 清理旧镜像时的判断逻辑
This commit is contained in:
@@ -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 "存在旧版本镜像 : "
|
||||
|
||||
Reference in New Issue
Block a user