singularityhub / sregistry-cli

Singularity Global Client for container management
https://singularityhub.github.io/sregistry-cli/
Mozilla Public License 2.0
14 stars 18 forks source link

sregistry pull from AWS ECR fails #145

Closed tbugfinder closed 6 years ago

tbugfinder commented 6 years ago

Please note this is probably related to https://github.com/sylabs/singularity/issues/2059

Version of sregistry:

sregistry 0.0.94 (pip)

Apparently it doesn't change after cloning this repository (version = "0.0.94").

Expected behavior

sregistry pull should pull images from AWS ECR successfully.

Actual behavior

sregistry pull fails with error message ERROR Unrecognized authentication challenge, exiting.. I've configured SREGISTRY_DOCKERHUB_BASE (with and without), SREGISTRY_DOCKER_PASSWORD and SREGISTRY_DOCKER_USERNAME with output of aws ecr get-login --no-include-email.

# sregistry pull docker://<accountid>.dkr.ecr.<region>.amazonaws.com/<path,image>:tag
ERROR Unrecognized authentication challenge, exiting.
ERROR Unrecognized authentication challenge, exiting.
ERROR Unrecognized authentication challenge, exiting.

Steps to reproduce behavior

vsoch commented 6 years ago

It's a harder problem than it appears at face value because people expect a pull of "ubuntu" from docker to default to the "library" collection. So there must be a collection.

tbugfinder commented 6 years ago

I was referring to this docker pull which doesn't care about a container:

# docker pull <aws account id>.dkr.ecr.<region>.amazonaws.com/myrepo:loveaws
loveaws: Pulling from myrepo
1d34996b8168: Pull complete
0d1d4c7589af: Pull complete
98890d3828f5: Pull complete
d531dc99c47b: Pull complete
b25948c45f1c: Pull complete
Digest: sha256:bb7177a4fcc6b0a8883e4fbcf5dd90e9c09a8898e0a9b258f211f654360b6cfc
Status: Downloaded newer image for <aws account id>.dkr.ecr.<region>.amazonaws.com/myrepo:loveaws
vsoch commented 6 years ago

If you have huge issue with the naming convention, feel free to submit a PR to suggest changes. This is my preference and I don't see you are blocked from using the endpoint, so I cannot commit the time to change it. The fact that another tool does it differently is not compelling enough. Thanks for your previous help!