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

后端 未结 2 1527
滥情空心
滥情空心 2020-12-29 18:51

What I\'m currently doing:

Dockerfile:

FROM python:3.5.1

ENV PYTHONUNBUFFERED 1

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


        
相关标签:
2条回答
  • 2020-12-29 19:21

    Another solution, albeit bruteforce, is to rebuild with the --no-cache flag before pushing again.

    docker rmi --force my-djnago-app:latest
    
    docker build -t my-djnago-app:latest . --no-cache
    
    docker push my-djnago-app:latest
    
    0 讨论(0)
  • 2020-12-29 19:35

    I found the problem, thanks to @lorenzvth7!

    I've had two images with same tag (which i was pushing to cloud).

    Solution is:

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

      docker images 
      
    2. Delete them:

      docker rmi --force 'image id'
      
    3. Thats it! Follow steps from my question above.
    0 讨论(0)
提交回复
热议问题