diff --git a/lib/datasource/docker/index.js b/lib/datasource/docker/index.js index 681c3cc71c61690d94224247ca6d993782ee6726..3db8dd174ef6a4b4eb09fed2ac8bb6c718de7610 100644 --- a/lib/datasource/docker/index.js +++ b/lib/datasource/docker/index.js @@ -19,7 +19,7 @@ function massageRegistry(input, registryUrls) { if (!registry || registry === 'docker.io') { registry = 'index.docker.io'; } - if (!registry.match('$https?://')) { + if (!registry.match('^https?://')) { registry = `https://${registry}`; } return registry; diff --git a/test/datasource/__snapshots__/docker.spec.js.snap b/test/datasource/__snapshots__/docker.spec.js.snap index 8288c34e08b1cf3e6c3eb39ace01b2fc50560580..f0cf96944117ab182207d93279962407bf73b5d9 100644 --- a/test/datasource/__snapshots__/docker.spec.js.snap +++ b/test/datasource/__snapshots__/docker.spec.js.snap @@ -193,13 +193,13 @@ exports[`api/docker getPkgReleases uses custom registry 1`] = ` [MockFunction] { "calls": Array [ Array [ - "https://https://registry.company.com/v2/", + "https://registry.company.com/v2/", Object { "throwHttpErrors": false, }, ], Array [ - "https://https://registry.company.com/v2/library/node/tags/list?n=10000", + "https://registry.company.com/v2/library/node/tags/list?n=10000", Object { "headers": Object {}, "json": true,