meta data for this page
Duplicate uploads issue
Scenario:
- build
project
Docker image with tagsproject:latest
andproject:my_feature
- push all tags of
project
with commandsdocker push -s project
- 1st tag
latest
is pushed- preparation of layers (compression, etc)
- pushing layers
- 2dn tag
my_feature
is pushed- preparation of layers (compression, etc)
- pushing layers
- server responds
layer already exists
So duplicate layers are not stored server side, but still all of them are compressed and pushed which take long time.
Solution:
- use Buildkit's external cache Cache storage backends
Gilab's registry
/opt/gitlab/embedded/bin/registry
./registry --version ./registry github.com/docker/distribution v3.76.0-gitlab
Config file: /var/opt/gitlab/registry/config.yml
During docker push
registry store received layers in: /var/opt/gitlab/gitlab-rails/shared/registry/docker/registry/v2/repositories/GROUP/PROJECTs/_uploads/4786e5fa-4e9b-4342-9c6f-3c80d72d07db/data