Halyard - How to use --password-command option?

439 views Asked by At

About Halyard,
I want to use --password-command option to refresh Amazon ECR Authorization Token. If you have experience of using this option, please teach me.
Thank you!

1

There are 1 answers

4
alok On BEST ANSWER

Here you go, the below worked for me.

hal config provider docker-registry account add my-ecr-registry \
 --address https://< Your ECR Endpoint> \
 --username AWS \
 --password-command "aws --region us-east-1 ecr get-authorization-token --output text --query 'authorizationData[].authorizationToken' | base64 -d | sed 's/^AWS://'"