ARTIFACTORY: Configuring the Docker private repo in the GitLab Pipeline

AuthorFullName__c
Sandeep Anikapati
articleNumber
000005255
FirstPublishedDate
2022-04-20T11:29:04Z
lastModifiedDate
2025-05-15

ARTIFACTORY: Configuring the Docker private repo in the GitLab Pipeline

How to configure Artifactory docker private repo in the GitLab Pipeline to pull the base image:


This article describes how to configure an Artifactory docker private repository in the GitLab Pipeline to pull the base image:

Sample gitlab-ci.yml file:

stages: 
  - build
test:
  stage: build
  image: test.jfrog.io/docker-local/ubuntu:latest

stages: 
  - build
test:
  stage: build
  image: test.jfrog.io/docker-local/ubuntu:latest


To download the base docker image from the Artifactory, you need to add a variable (i.e “DOCKER_AUTH_CONFIG”) with Artifactory configuration details in it.
 
Add the below variable to the GitLab variables:
 

Key :

DOCKER_AUTH_CONFIG
 

Value:

You can copy the configuration snippet from the Set Me Up page as shown below: 
User-added image

The screenshot of the variable (“DOCKER_AUTH_CONFIG”) from the GitLab:

User-added image



Once the above configuration is done, you will be able to pull the base image from Artifactory docker private repository via GitLab pipelines.