Use your own image on GitlabCI

Hello! This is my first post here, so apologies if I’m doing something wrong.

I’m actually using Gitlab CI/CD with SaaS Runners. I am using public docker images, but I´m interested to use my own image, but I don’t want to upload to public registry.

I have it uploaded on my own gitlab Registry, but when I try to use it, I got an issue with authentication.
This is my gitlab ci pipeline starts:

image:
  repository: myregistry.gitlab.com/myimage

When the pipe is executed, i’m getting authentication issues.

I made a research on gitlab documentation but I couldn’t found how can I use my own images if those are on a private repo.

Thanks!

One option is setting a DOCKER_AUTH_CONFIG CI/CD variable. Other options are highlighted here: Run your CI/CD jobs in Docker containers | GitLab

Hi @silveraignacio
There is no repository in the definition, there is just image: my_registry/my_image.
If the image you want to use is in the same project as your CI, than it can be used without any additional setup.
If the image is in another private registry or gitlab project, you need to setup authentication.
Using the DOCKER_AUTH_CONFIG is by far the easiest option. You can see how to generate value for this CI/CD variable in the docs linked by @rpadovani

Hello!

Thank you all for your help! As @balonik recommended, using only image: works as expected!

Thank you so much again!