diff --git a/lib/manager/docker/registry.js b/lib/manager/docker/registry.js index 5a53203555f2221cd4cf440e4efcb67b3653a2e5..cae3a83f8c4a9571cc849a69285edb368d018a79 100644 --- a/lib/manager/docker/registry.js +++ b/lib/manager/docker/registry.js @@ -5,8 +5,6 @@ module.exports = { getTags, }; -const map = new Map(); - async function getDigest(name, tag = 'latest') { const repository = name.includes('/') ? name : `library/${name}`; try { @@ -14,7 +12,7 @@ async function getDigest(name, tag = 'latest') { repository }:pull`; logger.debug(`Obtaining docker registry token for ${repository}`); - const { token } = (await got(authUrl, { cache: map, json: true })).body; + const { token } = (await got(authUrl, { json: true })).body; if (!token) { logger.warn('Failed to obtain docker registry token'); return null; @@ -25,8 +23,9 @@ async function getDigest(name, tag = 'latest') { Authorization: `Bearer ${token}`, Accept: 'application/vnd.docker.distribution.manifest.v2+json', }; - const digest = (await got(url, { cache: map, json: true, headers })) - .headers['docker-content-digest']; + const digest = (await got(url, { json: true, headers })).headers[ + 'docker-content-digest' + ]; logger.debug({ digest }, 'Got docker digest'); return digest; } catch (err) { @@ -42,7 +41,7 @@ async function getTags(name) { repository }:pull`; logger.debug(`Obtaining docker registry token for ${repository}`); - const { token } = (await got(authUrl, { cache: map, json: true })).body; + const { token } = (await got(authUrl, { json: true })).body; if (!token) { logger.warn('Failed to obtain docker registry token'); return null; @@ -53,7 +52,7 @@ async function getTags(name) { Authorization: `Bearer ${token}`, Accept: 'application/vnd.docker.distribution.manifest.v2+json', }; - const res = await got(url, { cache: map, json: true, headers }); + const res = await got(url, { json: true, headers }); logger.debug({ tags: res.body.tags }, 'Got docker tags'); return res.body.tags; } catch (err) {