[GitLab CI] How to pull from GitLab's Docker Registry in .gitlab-ci.yml?

56 views
Skip to first unread message

Jens Kohl

unread,
Aug 22, 2016, 3:06:02 AM8/22/16
to GitLab
Hi,

I recently switched on GitLab's Docker Registry feature and it works quite well on my desktop. The next step for us is to use the registry when building our software via GitLab CI. Instead of build a docker image, which is described in various ways in the documentation and on several medium.com posts which the official twitter account mentions, I can not find a way to pull our own images from GitLab's registry.

If we specify an image from the registry via the image directive in .gitlab-ci.yml we get an authorization error (I expected that the worker perhaps authorize themselves transparently, but this is not the case). So someone on the worker should call docker login. Two problems with that:

1. We authenticate our users via LDAP. Should we really create a static user just for the CI server?
2. We have quite a few worker running here. That's a lot of work to SSH'd into every single one.

Do I have overlooked something very obvious or should I go the route of docker login on every worker node?

Regards, Jens

Markus Koeberl

unread,
Aug 22, 2016, 6:53:00 AM8/22/16
to gitl...@googlegroups.com, Jens Kohl
have you tried to set the "Visibility Level" of the project to "Public"?


regards
Markus Köberl
--
Markus Koeberl
Graz University of Technology
Signal Processing and Speech Communication Laboratory
E-mail: markus....@tugraz.at

Jens Kohl

unread,
Aug 22, 2016, 11:12:56 AM8/22/16
to GitLab, jens...@gmail.com, spsc-s...@mlist.tugraz.at, markus....@tugraz.at

Am Montag, 22. August 2016 12:53:00 UTC+2 schrieb Markus Koeberl:
have you tried to set the "Visibility Level" of the project to "Public"?

I did not. When I do it works, BUT: this not what I want. Our gitlab instance is connected to the internet and this is no public project. I want to authorize my docker pull command analog to the documentation [1] when you push an image to the registry with docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.example.com — this CI_BUILD_TOKEN is not available for the worker which runs the runner, as far as I know.

Reply all
Reply to author
Forward
0 new messages