Build docker image with kaniko in GitLab pipeline
3 min readMay 10
--
GitLab offers a CICD pipeline template for building docker images — Docker.gitlab-ci.yml. As shown below, it uses docker-in-docker approach. To be more specific:
- docker:latest (image) is the docker client
- docker:dind (service) is the docker daemon, dind stands for docker-in-docker.
docker-build:
# Use the official docker image.
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY…