Fix registry detection
ECR registry does not have a username component
This commit is contained in:
@@ -119,8 +119,9 @@ function ping(callback) {
|
||||
}
|
||||
|
||||
function getRegistryConfig(image, callback) {
|
||||
// https://github.com/docker/distribution/blob/release/2.7/reference/normalize.go#L62
|
||||
const parts = image.split('/');
|
||||
if (parts.length === 2) return callback(null, null); // public docker registry
|
||||
if (parts.length === 1 || (parts[0].match(/[.:]/) === null)) return callback(null, null); // public docker registry
|
||||
|
||||
settings.getRegistryConfig(function (error, registryConfig) {
|
||||
if (error) return callback(error);
|
||||
|
||||
Reference in New Issue
Block a user