"Layer already exists " when trying to push an image

0 votes

I have an image that i'm trying to push but gives me a  very weird error.

sudo docker push docker.io/kalginshah/my-apache2
The push refers to a repository [docker.io/kalginshah/my-apache2]
9ca822a18384: Layer already exists 
4913dadb8da4: Layer already exists 
cb187a6f7133: Layer already exists 
13197fce7b91: Layer already exists 
94b0399694b0: Layer already exists 
37c16229e40b: Layer already exists 
83120c5c6d3b: Layer already exists 
8c466bf4ca6f: Layer already exists 
latest: digest: sha256:cc3aa9dd16a694d779c7f7f14e7b8ee8185e1d9ffdfb141190e2eba013a33865 size: 1987

What's the issue?

Sep 27, 2018 in Kubernetes by lina
• 8,100 points
1,536 views

4 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

I think the first time you tried pushing it said "layer mounted" and I'm guessing you tried to push again coz thats when you get this error.

Follow these steps:

1. remove/delete that image

docker rmi --force 'image id'

2. Tag the image

docker tag my-apache2:kalginshah/my-apache2

3. Push is again

docker push kalginshah/my-apache2
answered Sep 27, 2018 by Kalgi
• 35,720 points
0 votes
Check the image tags, you might have another image with the same tag.
answered Apr 23 by Vivek
0 votes

Inspect your images and find two or more with the same tag:

docker images 

Delete them:

docker rmi --force 'image id'

Retag them with the different tag name

answered Apr 23 by akaash
0 votes
I had a similar error. I hadn't tagged my image. I just had to tag it and then push. Worked like a charm
answered Apr 23 by Kalyan

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
454 views
+3 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

image can't be pulled error when I try to pull a docker image - kubernetes

I think the image is being pulled ...READ MORE

answered Sep 4, 2018 in Kubernetes by Kalgi
• 35,720 points
178 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.