Docker Push to AWS ECR Stuck on Preparing Layers

  Kiến thức lập trình

I’m trying to push a Docker image to AWS ECR, but the push operation gets stuck on the “Preparing” phase for several layers. Some layers are successfully pushed, but others seem to hang indefinitely. Here are the details:

  • Docker Version: 20.10.7
  • AWS CLI Version: 2.2.11
  • ECR Repository: us-east-1
  • Docker Image Size: 1.5GB

I’ve tried the following without success:

  1. Increased DOCKER_CLIENT_TIMEOUT and COMPOSE_HTTP_TIMEOUT.
  2. Re-authenticated Docker to ECR.
  3. Cleaned up Docker environment using docker system prune -a.
  4. Retagged and rebuilt the image.
  5. Checked ECR repository quotas and limits.

Here is the output from the push command:
The push refers to repository [account-number.dkr.ecr.us-east-1.amazonaws.com/ecr-name]
776c31dfbab7: Preparing
c0acb748926f: Preparing
839e9d64b172: Preparing
827094bbd8b7: Preparing
d148e300f750: Preparing
676b6cf4960e: Layer already exists
aab4e48709f9: Layer already exists
f00c32480af8: Layer already exists
e931248f6ddd: Layer already exists
78220692de73: Layer already exists
e8e5c6e3f5d5: Layer already exists
4dc356be6269: Layer already exists
c29e13d20b21: Layer already exists
ae9f122b68e5: Layer already exists

When I run docker push account-number.dkr.ecr.us-east-1.amazonaws.com/ecr-name:latest, I get the following error:
redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:6379. Connection refused

Here is the configuration I used in my Flask app:
python
Copy code
app.config[‘SESSION_REDIS’] = redis.from_url(‘redis://127.0.0.1:6379’)

Any advice on how to resolve this issue would be greatly appreciated!

New contributor

Sathish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT