Scenario:
project
Docker image with tags project:latest
and project:my_feature
project
with commands docker push -s project
latest
is pushedmy_feature
is pushedlayer already exists
So duplicate layers are not stored server side, but still all of them are compressed and pushed which take long time.
Solution:
/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