From e5aef5e51a6d299100db1bf0c82c85d835d51c58 Mon Sep 17 00:00:00 2001 From: Basil Bruhn Date: Fri, 22 Mar 2024 10:18:13 +0100 Subject: [PATCH] initial commit --- _toc.yml | 1 + .../gitlab/dependency_proxy.md | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 services-user-guide/gitlab/dependency_proxy.md diff --git a/_toc.yml b/_toc.yml index 26a07ac0..2029cb62 100644 --- a/_toc.yml +++ b/_toc.yml @@ -167,6 +167,7 @@ chapters: - file: services-user-guide/gitlab/git.psi.ch - file: services-user-guide/gitlab/container.psi.ch - file: services-user-guide/gitlab/gitpages.psi.ch + - file: services-user-guide/gitlab/dependency_proxy - file: services-admin-guide/index sections: diff --git a/services-user-guide/gitlab/dependency_proxy.md b/services-user-guide/gitlab/dependency_proxy.md new file mode 100644 index 00000000..ef5af690 --- /dev/null +++ b/services-user-guide/gitlab/dependency_proxy.md @@ -0,0 +1,25 @@ +# 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. \ No newline at end of file