plexsystems / sinker

A tool to sync images from one container registry to another
MIT License
609 stars 53 forks source link

AWS ECR docker auth credential helper support #76

Open dobesv opened 1 year ago

dobesv commented 1 year ago

I'm trying to use sinker with the AWS ECR credential helper for docker, but getting errors:

 AWS_PROFILE=k8s sinker copy -i  quay.io/argoproj/argocd:v2.8.3 -t 555337501170.dkr.ecr.us-east-1.amazonaws.com
INFO[0000] Finding images that need to be copied ...    
INFO[0001] Copying image quay.io/argoproj/argocd:v2.8.3 to 552312313.dkr.ecr.us-east-1.amazonaws.com/argoproj/argocd:v2.8.3 
Error: copy: copy image: copying system image from manifest list: trying to reuse blob sha256:3153aa388d026c26a2235e1ed0163e350e451f41a8a313e1804d7e1afb857ab4 at destination: checking whether a blob sha256:3153aa388d026c26a2235e1ed0163e350e451f41a8a313e1804d7e1afb857ab4 exists in 552312313.dkr.ecr.us-east-1.amazonaws.com/argoproj/argocd: authentication required

I am able to push/pull images to/from this repo using docker command line.

I notice the docs say that

All auth is handled by looking at the clients Docker auth. If the client can perform a docker push or docker pull, sinker will be able to as well.

But I wonder if that extends to the use of credential helpers?

If I switch to storing credentials in the docker config, it works again.