Răsfoiți Sursa

dont restart container unless new hash

reid 2 ani în urmă
părinte
comite
29c279ed88
1 a modificat fișierele cu 3 adăugiri și 5 ștergeri
  1. 3 5
      docker/docker.go

+ 3 - 5
docker/docker.go

@@ -156,11 +156,9 @@ func StartContainer(containerName string, containerType string) (structs.Contain
 	}
 	}
 	imageExistsLocally := false
 	imageExistsLocally := false
 	for _, img := range images {
 	for _, img := range images {
-		for _, tag := range img.RepoTags {
-			if img.ID == desiredHash {
-				imageExistsLocally = true
-				break
-			}
+		if img.ID == desiredHash {
+			imageExistsLocally = true
+			break
 		}
 		}
 		if imageExistsLocally {
 		if imageExistsLocally {
 			break
 			break