Dependency Proxy
Introduced in GitLab Ultimate 11.11.
For many organizations, it is desirable to have a local proxy for frequently used upstream images/packages. In the case of CI/CD, the proxy is responsible for receiving a request and returning the upstream image from a registry, acting as a pull-through cache.
The dependency proxy is available in the group level. To access it, navigate to a group’s Packages > Dependency Proxy.
Supported dependency proxies
The following dependency proxies are supported.
Dependency proxy | GitLab version |
---|---|
Docker | 11.11+ |
Using the Docker dependency proxy
With the Docker dependency proxy, you can use GitLab as a source for a Docker image. To get a Docker image into the dependency proxy:
- Find the proxy URL on your group’s page under Packages > Dependency Proxy,
for example
gitlab.com/groupname/dependency_proxy/containers
. -
Trigger GitLab to pull the Docker image you want (e.g.,
alpine:latest
orlinuxserver/nextcloud:latest
) and store it in the proxy storage by using one of the following ways:-
Manually pulling the Docker image:
docker pull gitlab.com/groupname/dependency_proxy/containers/alpine:latest
-
From a
Dockerfile
:FROM gitlab.com/groupname/dependency_proxy/containers/alpine:latest
-
In
.gitlab-ci.yml
:image: gitlab.com/groupname/dependency_proxy/containers/alpine:latest
-
GitLab will then pull the Docker image from Docker Hub and will cache the blobs on the GitLab server. The next time you pull the same image, it will get the latest information about the image from Docker Hub but will serve the existing blobs from GitLab.
The blobs are kept forever, and there is no hard limit on how much data can be stored.
Clearing the cache
It is possible to use the GitLab API to purge the dependency proxy cache for a given group to gain back disk space that may be taken up by image blobs that are no longer needed. See the dependency proxy API documentation for more details.
Limitations
The following limitations apply:
- Only public groups are supported (authentication is not supported yet).
- Only Docker Hub is supported.
- This feature requires Docker Hub being available.
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc