Is a Docker Hub required to download the whole image every time I make a change?

I tested Docker and I did the following:

  • Image call: docker/whalesay
  • Another image was built with some minor changes.
  • Threw it with a different name into my shared repository (it was necessary to download about the same size that I downloaded).
  • Then I created another image with this public image as a starting point.
  • It has only one team. But again I had to upload the whole image back.

My question is, should Docker not only upload changes? I read it somewhere. It seems I am making some kind of stupid mistake, I can’t believe that we have to download the whole image every time after minor changes. Did I miss something?

This is the Dockerfile that I use to create a fishsay image:

 FROM docker/whalesay:latest RUN apt-get -y update && apt-get install -y fortunes CMD /usr/games/fortune -a | cowsay 

The keel image was ~ 180 MB; so when i click i dont just need to load changed layers?

+5
source share
2 answers

Any layer changes in your image will require updating in the repository when calling docker push . This can be small and trivial, for example, including a new package (for example: vi) in your image. However, this will create new layers and replace existing layers, invoking different layer identifiers from what is already in the registry. docker push loads all new layers created in the registry, excluding the base image.

+1
source

I also face the same question what I came to,

https://github.com/docker/docker/issues/18866#issuecomment-192770785 https://github.com/docker/docker/issues/14018

As mentioned above, this feature is implemented in Docker Engine 1.10 / Registry 2.3.

And after email to support docker I got the following response

Hello,

Unfortunately, we have no deadlines for when updates for the Docker Hub occur, we can publicly publish. Sorry for any problems caused by this.

/ Jeff

0
source

Source: https://habr.com/ru/post/1233464/


All Articles