Closed mikehaertl closed 8 years ago
Hi @mikehaertl,
The new content addressable storage feature in Docker 1.10 relates to how a Docker daemon storages images locally.
There is a different feature in 1.10 called cross-repository push that addresses the use case you're describing. It allows the engine to prove to a registry that it has access to layers in a different repository. This allows it to skip pushing redundant copies of that layer.
This feature requires registry-side support, which is available in the brand new Registry 2.3. Docker Hub isn't running this new version quite yet, but once they are, pushing custom images to Hub won't require repushing base layers.
@mikehaertl also worth mentioning: for Hub specific questions and updates, I recommend you reach out to the Hub Support Team: support@docker.com
I thought that docker 1.10 would improve reuse of layers with identical content. But still I see a lot of layers being moved around whenever I build a new image and push it to docker hub.
Here's an example:
I have built an image from my
Dockerfile
here: https://github.com/codemix/yii2-dockerbase/blob/master/2.0/apache/DockerfileIt's based on the official php image (
FROM php:5.6.18-apache
). So I would expect, that it does not upload the layers from that base image again when I push my image to docker hub. But that's not the case.Here's the history of my local image:
Now when I push my custom image, I see this:
So it basically pushed all the layers again. Even
ddef88
which is not part of my build but seems to belong to the official php image.I would have expected that with 1.10 it would only push the id of the content addressable diff to docker hub and then see, that this content is already there. So it should not upload it again.