Home:ALL Converter>docker push to docker hub and/or AWS ECR fails

docker push to docker hub and/or AWS ECR fails

Ask Time:2022-06-21T04:13:36         Author:Joseph Larson

Json Formatter

My OS: Ubuntu 20.04 LTS Docker Version: 20.10.17, build 100c701

Symptoms: do a docker push to either docker hub or AWS ECR. 1 or more of the layers will fail and retry, fail and retry, fail and retry. Sometimes it looks like it's nearly done, sometimes it's sooner. Eventually the entire command will fail.

If I retry the command, the same problem layers remain problem layers.

If I rebuild my image, the problem may get better or worse. It does appear to move around with a different image build, but at one point I was pushing a base image (and it was failing), so I pushed a child image, and that push failed on the same layer as the base image while being peachy-keen with the other layers.

Web searches suggest fixes from 2020 or 2021, which certainly should be in the mainstream now, although perhaps both Amazon and Docker Hub are running ancient (and broken) versions.

Additional Info:

Tried from my Mac. Same failure.

ca1399d10d43: Layer already exists
b74197196d00: Layer already exists
2c9fd6cbb874: Retrying in 7 seconds
d79f7f0a3cf1: Layer already exists
36eb8e32aa2f: Layer already exists```

It's not an authentication problem. And it's really quite consistent -- some layers upload, some don't. So I don't see how it can be a network issue.

Author:Joseph Larson,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/72692507/docker-push-to-docker-hub-and-or-aws-ecr-fails
yy