Unable to push docker image to private repo in ECR.

0

When pushing to a private repo I'm getting an error:

docker push {acct id}.dkr.ecr.{region}.amazonaws.com/playwright:latest
The push refers to repository [{acct id}.dkr.ecr.{region}.amazonaws.com/playwright]
8c0977a15bc0: Layer already exists
8fbe1c855a6c: Pushed
e7234a7e0585: Pushed
b66a8735f383: Retrying in 1 second
a232236bb712: Pushed
8126a9472cb2: Pushing [======>                                            ]  212.7MB/1.57GB
755d11fc3fb7: Layer already exists
1606b10d8772: Pushing [===========================================>       ]  235.5MB/270.7MB
59c56aee1fb4: Retrying in 1 second
dialing {acct id}.dkr.ecr.{region}.amazonaws.com:443 with direct connection: resolving host {acct id}.dkr.ecr.{region}.amazonaws.com: lookup {acct id}.dkr.ecr.{region}.amazonaws.com: no such host

Any idea what it means? I'm able to login fine with below command:

aws ecr get-login-password --region {region} | docker login --username AWS --password-stdin {acct id}.dkr.ecr.{region}.amazonaws.com

I also have the permission: AmazonEC2ContainerRegistryFullAccess

quldude
posta 9 mesi fa2070 visualizzazioni
2 Risposte
1
Risposta accettata
quldude
con risposta 9 mesi fa
profile picture
ESPERTO
verificato 9 giorni fa
profile picture
ESPERTO
verificato un mese fa
0

he error message you're seeing, specifically the "no such host" part, indicates that the DNS resolution for the ECR endpoint is failing. This could happen for a variety of reasons, but here are some common troubleshooting steps you can follow:

  • Verify the ECR URL: Ensure that the URL for the ECR repository is correct. Double-check the account ID and region to make sure they are accurate.
  • Docker Daemon Restart: Sometimes restarting the Docker daemon can solve transient issues. You can do this with the following command:

sudo systemctl restart docker

  • AWS CLI Version: Ensure that you are using the latest version of the AWS CLI and Docker. Outdated versions might have compatibility issues.

  • Proxy Settings: If you are using a proxy, ensure that it's correctly configured to allow connections to the ECR endpoints.

  • Explicitly Specify the Protocol: You may try specifying the protocol (https) in the ECR URL. Like this:

docker push https://{acct id}.dkr.ecr.{region}.amazonaws.com/playwright:latest
  • Retry the Operation: Transient network errors can sometimes cause this issue. Simply retrying the push operation might resolve it.

  • Check System Logs: Sometimes, system logs can provide more detailed information about the underlying issue. You can check the Docker logs or system logs for more details.

profile picture
con risposta 9 mesi fa
  • The ECR Url is correct. I'm using the push commands shown in the repo. How come some layers succeed and others dont?

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande