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:
The screenshot of the variable (“DOCKER_AUTH_CONFIG”) from the GitLab:
Once the above configuration is done, you will be able to pull the base image from Artifactory docker private repository via GitLab pipelines.