本文介绍了Docker - 什么是正确的方式来重建并将更新的图像推送到码头云?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Waht我现在在做:

Waht I'm doing now:

Dockerfile:

Dockerfile:

FROM python:3.5.1

ENV PYTHONUNBUFFERED 1

RUN mkdir /www
WORKDIR /www
ADD deps.txt /www/
RUN pip3 install -r deps.txt
ADD . /www/
RUN chmod 0755 /www/docker-init.sh

构建命令:

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 [docker.io/lolorama/my-django-app-img]
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

我在做错什么?

推荐答案

我发现问题,感谢@ lorenzvth7!

I found the problem, thanks to @lorenzvth7!

我有两个相同标签的图片(我正在推向云端)。

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

解决方案是:


  1. 检查您的图像并找到两个或更多相同的标签:

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

docker images 


  • 删除它们:

  • Delete them:

    docker rmi --force 'image id'
    


  • 这是它!按照我上面的问题的步骤。

  • 这篇关于Docker - 什么是正确的方式来重建并将更新的图像推送到码头云?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    10-11 00:52