Docker Community Forums

Share and learn in the Docker community.

What is proper way to rebuild and push updated image to docker cloud?


(Lolorama) #1

I’m newbie in docker so maybe question is quite common here, sorry for that.

I can’t push new image to Old image doesn’t change after push.

My steps:


FROM python:3.5.1


RUN mkdir /www
ADD deps.txt /www/
RUN pip3 install -r deps.txt
ADD . /www/
RUN chmod 0755 /www/

Build command:

docker build -t my-djnago-app:latest .


docker tag my-djnago-app:latest lolorama/my-djnago-app-img:latest


docker push lolorama/my-djnago-app-img:latest

After these steps repository image haven’t been updated. I always get “Layer already exists” message.

The push refers to a repository []
fd5aa641b308: Layer already exists
d9c60c6f98e8: Layer already exists
d9d14867f6d7: Layer already exists
64ce166099ca: Layer already exists
73b670e35c69: Layer already exists
5f70bf18a086: Layer already exists
9ea142d097a5: Layer already exists
52f5845b1de0: Layer already exists
e7fadb3ab9d4: Layer already exists
cef72744de05: Layer already exists
591569fa6c34: Layer already exists
998608e2fcd4: Layer already exists
c12ecfd4861d: Layer already exists

What I’m doing wrong?

(Geoff Bowers) #2

Can you see the changes you are expecting when you run the image in your local docker-machine?

How are you deploying the updated image to Docker Cloud? Have you redeployed the service?

(Lolorama) #3

Thanks for response. I have already found the problem…

I’ve had two images with same tag (which i was pushing to cloud). ‘–force’ delete and rebuild have solved this issue.

(Saikojosh) #4

This isn’t listed as a command line option for “docker push”? Where are you applying this?

(Dchoi) #5

I am having the same issue. Could you please elaborate on your solution?

EDIT: My solution was that I was working on a BuildSwarm and the dockerhost was not defaulting to the one I needed (export DOCKER_HOST=xxxxxxxxx)

(archcom) #6

Same issue. Auto build from source kicks off as expected and then the service shows redeployed from push but changes are not in the deployed container…