fix(docker): retry 406 repository with library prefix

Closes #3078
This commit is contained in:
Rhys Arkins 2019-01-19 13:43:17 +01:00
parent 2c8484817d
commit b8df0f8571

View file

@ -266,6 +266,10 @@ async function getTags(registry, repository) {
}, },
'docker.getTags() error' 'docker.getTags() error'
); );
if (err.statusCode === 406 && !repository.includes('/')) {
logger.info('Retrying docker repository using library/ prefix');
return getTags(registry, 'library/' + repository);
}
if (err.statusCode === 401) { if (err.statusCode === 401) {
logger.info( logger.info(
{ registry, dockerRepository: repository, err }, { registry, dockerRepository: repository, err },