From 7d5d330d8fb7be39e1eb09143019b46916f27f1a Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@keylocation.sg>
Date: Fri, 3 Nov 2017 14:48:14 +0100
Subject: [PATCH] fix: loosen docker digest replace regex (#1098)

By searching for the *original* value, this caused problems if a tag gets updated multiple times in the same PR.

Closes #1050 hopefully for the last time
---
 lib/manager/docker/update.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/manager/docker/update.js b/lib/manager/docker/update.js
index 29258e52d6..4ced9834a0 100644
--- a/lib/manager/docker/update.js
+++ b/lib/manager/docker/update.js
@@ -11,7 +11,7 @@ function setNewValue(
 ) {
   try {
     logger.debug(`setNewValue: ${depName} = ${newVersion}`);
-    const regexReplace = new RegExp(`(^|\n)FROM ${currentVersion}\n`);
+    const regexReplace = new RegExp(`(^|\n)FROM ${depName}.*?\n`);
     const newFileContent = currentFileContent.replace(
       regexReplace,
       `$1FROM ${newVersion}\n`
-- 
GitLab