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
질문됨 9달 전2068회 조회
2개 답변
1
수락된 답변
quldude
답변함 9달 전
profile picture
전문가
검토됨 9일 전
profile picture
전문가
검토됨 한 달 전
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
답변함 9달 전
  • The ECR Url is correct. I'm using the push commands shown in the repo. How come some layers succeed and others dont?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠