meta data for this page
Duplicate uploads issue
Scenario:
- build
projectDocker image with tagsproject:latestandproject:my_feature - push all tags of
projectwith commandsdocker push -s project - 1st tag
latestis pushed- preparation of layers (compression, etc)
- pushing layers
- 2dn tag
my_featureis 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