1.2 KiB
Dependency Proxy
The dependency proxy in Gitlab is only able to pull images from docker hub. There is an epic on Gitlab.com to support other registries. https://gitlab.com/groups/gitlab-org/-/epics/6061
How to use the dependency proxy?
Manually:
Enable the dependency proxy in the desired group and use following command:
docker pull git.psi.ch/GROUPNAME/dependency_proxy/containers/IMAGENAME:TAG
docker pull git.psi.ch/docker/dependency_proxy/containers/alpine:latest pulls the image to your computer “trough” the dependency proxy. If the image digest is the same on dockerhub and in the dependency proxy, it will pull from the proxy.
Automated:
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/alpine:latest
Add this to your .gitlab-ci.yml to use the proxy in your pipelines. You can find the exact line of code when you enable the dependency proxy in your group.
https://docs.gitlab.com/ee/user/packages/dependency_proxy/#use-the-dependency-proxy-for-docker-images All the documentation can be found here.
Note
The dependency proxy and the docker registry are not the same blob storage and therefore the images are also named differently. It is suggested to use the dependency proxy only in automated setups / pipelines.