Why does docker push base image layers that are already on docker hub?

There is still some problems with pushing Private Images to DockerHub. I have loads of tags and what I’m changing is only top layer that is max 5 MB. But every time push still pushes loads of layers.
Let me exemplify:

  • First pull image from Docker Hub
    docker pull kuekuune/heatmap-client:0.27.1.51 0.27.1.51: Pulling from kuekuune/heatmap-client fdd5d7827f33: Already exists a3ed95caeb02: Already exists 716f7a5f3082: Already exists 7b10f03a0309: Already exists d8f1cf58f924: Already exists 9df68f97f936: Already exists 758357287b8a: Already exists 60162a70eb35: Already exists 3b652fca4381: Already exists a49d0a410c40: Already exists 9124416e8857: Already exists ab273d36c0c2: Already exists 18b678a0c607: Pull complete Digest: sha256:00c1442a3d190686ff2c70776d176bd2afc939861a825e09014d5a8ede22783c Status: Downloaded newer image for kuekuune/heatmap-client:0.27.1.51
  • Then push it right back to DockerHub
    docker push kuekuune/heatmap-client:0.27.1.51 The push refers to a repository [docker.io/kuekuune/heatmap-client] 387403934352: Layer already exists f2790b5754a4: Layer already exists 1c78f1350876: Layer already exists aaedb5e569af: Pushed 14bfeef71cab: Pushed 796e2ee71356: Pushed 7cbd3e76c6a5: Pushing [===========> ] 52.67 MB/223.9 MB 288d77512d07: Pushed 629a9320508f: Pushing [=======================================> ] 31.86 MB/39.98 MB 5f70bf18a086: Layer already exists 3f3324023e75: Layer already exists f0d7d68f89e5: Layer already exists 917c0fc99b35: Pushing [=======> ] 19.55 MB/125.1 MB
  • As can be seen, only 6 layers are considered to exist in DockerHub.
  • In the end my build takes time 3 minutes and 10 minutes I push 4 images to DockerHub.

Docker Engine information:
`docker version
Client:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 21:49:11 2016
OS/Arch: darwin/amd64

Server:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 21:49:11 2016
OS/Arch: linux/amd64`

I found one open bug that v2 registry does not recognize layers: https://github.com/docker/distribution/issues/1411. Might this be the source of my troubles?