Docker cli won't push my image to ECR

2

I have created a registry and I am able to login through the docker cli to ECR using

aws ecr get-login-password...

however when I execute the docker push command...

docker push 593040300828.dkr.ecr.ap-southeast-2.amazonaws.com/tsystems-loader:latest

it doesn't work, the first 5 portions just keep retrying untill I get an EOF...

The push refers to repository [593040300828.dkr.ecr.ap-southeast-2.amazonaws.com/tsystems-loader]
72bbc9ac96a6: Retrying in 1 second 
f30814431bd3: Retrying in 1 second 
5f70bf18a086: Retrying in 1 second 
f329eecf10bd: Retrying in 1 second 
01b48b68c200: Retrying in 1 second 
1f981941d034: Waiting 
ee9738662de6: Waiting 
71ae3b9da9b3: Waiting 
7fcb75871b21: Waiting 
EOF

I have checked my firewall settings but I can't see any issues. I'm unable to find/read any logs for docker

My system MacOS Mojave 10.14.6

Docker version 20.10.11, build dea9396
aws-cli/2.4.1 Python/3.8.8 Darwin/18.7.0 exe/x86_64 prompt/off

mac console application has this to say

default	22:38:00.957671 +1100	com.docker.hyperkit	[364:11:38:00.965][I] guest: still waiting for osxfs-data after 3h45m0.0025302s
default	22:38:10.949001 +1100	com.docker.hyperkit	[364:11:38:10.964][I] guest: still waiting for osxfs-data after 3h45m10.001184644s
default	22:38:20.941394 +1100	com.docker.hyperkit	[364:11:38:20.942][I] guest: still waiting for osxfs-data after 3h45m20.001059404s
default	22:38:21.301292 +1100	com.docker.driver.amd64-linux	proxy >> HEAD /_ping
default	22:38:21.304185 +1100	com.docker.driver.amd64-linux	proxy << HEAD /_ping (2.90769ms)
default	22:38:21.357189 +1100	com.docker.driver.amd64-linux	proxy >> HEAD /_ping
default	22:38:21.358910 +1100	com.docker.driver.amd64-linux	proxy << HEAD /_ping (1.749045ms)
default	22:38:21.407791 +1100	com.docker.driver.amd64-linux	proxy >> HEAD /_ping
default	22:38:21.409707 +1100	com.docker.driver.amd64-linux	proxy << HEAD /_ping (1.946499ms)
error	22:38:21.444691 +1100	com.docker.cli	nw_path_close_fd Failed to close guarded necp fd 8 [9: Bad file descriptor]
default	22:38:21.485138 +1100	docker-credential-osxkeychain	UNIX error exception: 17
default	22:38:21.488531 +1100	docker-credential-osxkeychain	UNIX error exception: 17
default	22:38:21.490367 +1100	docker-credential-osxkeychain	UNIX error exception: 17
default	22:38:21.492620 +1100	docker-credential-osxkeychain	UNIX error exception: 17
default	22:38:21.494611 +1100	docker-credential-osxkeychain	UNIX error exception: 17
default	22:38:21.497331 +1100	docker-credential-osxkeychain	UNIX error exception: 17
default	22:38:21.592730 +1100	com.docker.driver.amd64-linux	(d42fb075) b586f281-DriverCMD C->S SwiftAPI POST /usage: {"command":"imagePushCliLinux","count":1}
default	22:38:21.620788 +1100	com.docker.driver.amd64-linux	(d42fb075) b586f281-DriverCMD C<-S adaef121-SwiftAPI POST /usage (28.104391ms): OK
default	22:38:21.620914 +1100	com.docker.driver.amd64-linux	usage imagePushCliLinux + 1
default	22:38:21.621002 +1100	com.docker.driver.amd64-linux	proxy >> POST /v1.41/images/593040300828.dkr.ecr.ap-southeast-2.amazonaws.com/tsystems-loader/push?tag=latest
default	22:38:21.644493 +1100	com.docker.backend	failed to lookup nlb1-8e7a241509b00b85.elb.ap-southeast-2.amazonaws.com.: name exists but no relevant records
default	22:38:30.935796 +1100	com.docker.hyperkit	[364:11:38:30.944][I] guest: still waiting for osxfs-data after 3h45m30.002709212s
default	22:38:40.926193 +1100	com.docker.hyperkit	[364:11:38:40.941][I] guest: still waiting for osxfs-data after 3h45m40.000274073s
default	22:38:50.919041 +1100	com.docker.hyperkit	[364:11:38:50.920][I] guest: still waiting for osxfs-data after 3h45m50.000914141s
asked 2 years ago7622 views
3 Answers
0

There might be something wrong with your DNS, can you try changing the DNS server that Docker uses? See https://github.com/docker/for-win/issues/11204#issuecomment-908582342

EXPERT
answered 2 years ago
  • thanks Ben, I tried this..

      "dns": [
        "10.0.0.2",
        "8.8.8.8"
      ]
    

    but still same result. I ran another diagnostic...

    (base) Michaels-MacBook-Pro:~ michael_r$ docker run busybox nslookup google.com
    Server:		8.8.8.8
    Address:	8.8.8.8:53
    
    Non-authoritative answer:
    Name:	google.com
    Address: 142.250.66.206
    
    *** Can't find google.com: No answer
    
    (base) Michaels-MacBook-Pro:~ michael_r$ docker run busybox nslookup 593040300828.dkr.ecr.ap-southeast-2.amazonaws.com
    Server:		8.8.8.8
    Address:	8.8.8.8:53
    
    Non-authoritative answer:
    593040300828.dkr.ecr.ap-southeast-2.amazonaws.com	canonical name = nlb3-184e0ef1caec9d29.elb.ap-southeast-2.amazonaws.com
    Name:	nlb3-184e0ef1caec9d29.elb.ap-southeast-2.amazonaws.com
    Address: 13.237.123.211
    
    *** Can't find 593040300828.dkr.ecr.ap-southeast-2.amazonaws.com: No answer
    
0

The same problem occurred on my side, after upgrading docker, the problem vanished:

docker --version
Docker version 20.10.12, build e91ed57
fred
answered 2 years ago
0

Hi, did the console show you login successfully?

I got this error in my bitbucket-pipelines when my access key and my secret key are not correct.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions