瀏覽代碼

dont restart container unless new hash

reid 2 年之前
父節點
當前提交
29c279ed88
共有 1 個文件被更改,包括 3 次插入5 次删除
  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
 	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 {
 			break