mirror of
https://github.com/containers/skopeo.git
synced 2025-09-09 10:39:30 +00:00
Remove a (skopeo inspect) workaround for IBM Bluemix
AFAICT, “IBM Bluemix” has become “IBM Cloud”, and the “Bluemix” registry is now (somehow related to?) icr.io; e.g. https://cloud.ibm.com/docs/Registry?topic=Registry-registry_overview lists bluemix.net and icr.io host names. Randomly looking for a public image hosted on that registry, at least > skopeo list-tags docker://icr.io/codeengine/firstjob now succeeds. So I’m assuming that at least the current cloud deployment now allows listing tags, and does not need special handling. (It's unclear if that is true for all existing deployments.) Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@@ -203,12 +203,11 @@ func (opts *inspectOptions) run(args []string, stdout io.Writer) (retErr error)
|
||||
}
|
||||
outputData.RepoTags, err = docker.GetRepositoryTags(ctx, sys, img.Reference())
|
||||
if err != nil {
|
||||
// some registries may decide to block the "list all tags" endpoint
|
||||
// gracefully allow the inspect to continue in this case. Currently
|
||||
// the IBM Bluemix container registry has this restriction.
|
||||
// In addition, AWS ECR rejects it with 403 (Forbidden) if the "ecr:ListImages"
|
||||
// Some registries may decide to block the "list all tags" endpoint;
|
||||
// gracefully allow the inspect to continue in this case:
|
||||
// - AWS ECR rejects it with 403 (Forbidden) if the "ecr:ListImages"
|
||||
// action is not allowed.
|
||||
if !strings.Contains(err.Error(), "401") && !strings.Contains(err.Error(), "403") {
|
||||
if !strings.Contains(err.Error(), "403") {
|
||||
return fmt.Errorf("Error determining repository tags: %w", err)
|
||||
}
|
||||
logrus.Warnf("Registry disallows tag list retrieval; skipping")
|
||||
|
Reference in New Issue
Block a user