1

I'm trying to use an image from a private docker hub registry within my GitLab .yml file. I assume I would need some way of logging into docker hub to access the private registry, however, I'm pretty sure the runner is trying to pull the image before it's able to login to docker hub, so the pull is failing. Is there a way I can configure the runner to authenticate docker hub for me?

Junfatboi
  • 11
  • 1
  • 1
    absolutely you can , use a token to auth to the docker private hub and grab the image – Chamsddine Bouzaine Oct 23 '20 at 23:42
  • @ChamsddineBouzaine Could you give me an example of how this would look? I've tried using a docker login, but it doesnt seem to be authenticating the token before trying to pull the image from the private registry. – Junfatboi Oct 26 '20 at 15:29
  • I think you have 2 options, make the image public so you can pull it directly by specifying: image: name_of_your_repo/image_you_created or you can build it into the gitlab container registry then use it privetly and their is some gitlab variables that can help you with that. – Zemmouri Tarek Sep 23 '22 at 12:22

0 Answers0