Setup GitLab Container Registry

Create GitLab Container Registry on node c2d-gitlab.

This how-to describes how create and use the GitLab Container Registry. This registry is not enabled by default in GitLab CE but it is enabled on default in this project by Ansible see group_vars/gitlab/registry.yml



In this project we access the GitLab registry using URL  via reverse proxy running on c2d-rproxy.

Start GitLab

Start GitLab instance created using Setup GitLab.

vagrant up c2d-gitlab


If create a GitLab project and navigate to Packages and registries you should see three options one of which is Container Registry.

Login and Push

To verify that the registry is working, you can try to push an image to it. In example below we use the node c2d-gitlab-runner for this purpose.

vagrant up c2d-gitlab-runner

Now we can test if we can login to the registry:

vagrant@c2d-gitlab-runner:~$ sudo su -
root@c2d-gitlab-runner:~# docker login
Username: root
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See

Login Succeeded

Download an image for example docker pull ubuntu tag it and then push it to a Gitlab project. For example if we created project c2platform/gitlab-docker-build  as part of Setup GitLab.

docker tag ubuntu:latest
docker push


If you performs the steps in How-to Running GitLab CE pipelines in Kubernetes this also verifies the GitLab Container Registry is enabled and working correctly. TODO