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,220 points
51,469 views

4 answers to this question.

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
• 52,360 points
0 votes
Check the image tags, you might have another image with the same tag.
answered Apr 23, 2019 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, 2019 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, 2019 by Kalyan

Related Questions In Kubernetes

0 votes
1 answer
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17, 2019 in Others by anonymous
15,331 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,946 views
+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
• 52,360 points
6,150 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP