fix: escape docker container check from Go template parser
docker ps --format '{{.Names}}' gets eaten by text/template before
Docker sees it. Use docker container ls + grep instead.
This commit is contained in:
parent
0dbf4432dd
commit
6a59d46631
1 changed files with 1 additions and 1 deletions
|
|
@ -561,7 +561,7 @@ while IFS='|' read -r comp_name comp_kind comp_req comp_vcmd comp_file comp_sha
|
|||
continue
|
||||
fi
|
||||
if [ "$comp_kind" = "docker" ]; then
|
||||
if command -v docker >/dev/null 2>&1 && docker ps --format '{{.Names}}' 2>/dev/null | grep -q redflag; then
|
||||
if command -v docker >/dev/null 2>&1 && docker container ls 2>/dev/null | grep -q redflag; then
|
||||
DOCKER_VER=$(docker run --rm 10.10.20.120:4455/fimeg/redflag:${VERSION} ./redflag-server --version 2>/dev/null || echo "unknown")
|
||||
if echo "$DOCKER_VER" | grep -q "v${VERSION}"; then
|
||||
checkoff "$comp_name" "ok" "docker image v${VERSION} present"
|
||||
|
|
|
|||
Loading…
Reference in a new issue