docker-registry-ui
docker-registry-ui copied to clipboard
Usage with AWS ECR private registry repo
I'm not sure if this project is usable with AWS ECR private registry repo.
Tried using ui-as-proxy as example where I set the NGINX_PROXY_PASS_URL as my AWS ECR repo url and entered the auth but got an error message "Could not resolve registry id from host localhost".
Would appreciate any advice!
Hello there. Sorry I'm not familiar with AWS ECR, what is the protocol they are using for auth ? basic auth ? token auth ?
Hi, I've tried the basic auth with username and password. Here's the aws guide for auth to their docker registry for you reference.
Hum... It seems like you will need to generate a token with this comand
TOKEN=$(aws ecr get-authorization-token --output text --query 'authorizationData[].authorizationToken')
This token is a base64 encoded string that contains a login and password, so you can reverse it with this command:
echo $TOKEN | base64 -d
This will produce an output with semicolon, the first part will be the login and the second part the password.
Try it and tell me if this worked :smile:
Unfortunately, it doesn't seem to work. It still calls the same error "Could not resolve registry id from host localhost".
This is weird because in the part "Using HTTP API authentication" they use the command
TOKEN=$(aws ecr get-authorization-token --output text --query 'authorizationData[].authorizationToken')
Then this one
curl -i -H "Authorization: Basic $TOKEN" https://aws_account_id.dkr.ecr.region.amazonaws.com/v2/amazonlinux/tags/list
That means the token must follow the Basic Authorization specification and it's a base64 encoded string of something like username:password
.
Your registry URL must be https://aws_account_id.dkr.ecr.region.amazonaws.com
Can you try the example from the user guide and tell me if it works ?
I'm sorry, I do not have a AWS account and can't try it myself...
Hi there, I'm closing this issue due to inactivity