Aller au contenu

Description

Template pour utiliser Kaniko afin de construire dans images Docker sans passer par DinD.

Utilisation

.gitlab-ci.yml
---
stages:
  - build

include:
  - remote: 'https://gitlab-templates.galilee.fr/docker_build/2.0.1.yml'

Variables accessibles

Name Description Default
CUSTOM_TAGS Add one or more specific tag for your image. each tag are separated with space.
COMMIT_CREATE_LATEST In a commit context, also update latest tag false
TAG_CREATE_LATEST In a tag context, also update latest tag true
DOCKER_CONTEXT_PATH Path of build context from to repository root
DOCKERFILE_PATH Path to Dockerfile from the build context (see DOCKER_CONTEXT_PATH) Dockerfile
DOCKER_USE_CACHE Cache Dockerfile layers. Cached layers are stored in the container registry{:target="_blank"} in /cache repository false
DOCKER_CACHE_TTL Cached layers TTL 336h
DOCKER_SNAPSHOT_MODE Flag to set how kaniko will snapshot the filesystem. With redo, may be 50% faster than default, as described in the doc. redo
KANIKO_USE_NEWRUN Enable Kaniko option --use-new-run true
DOCKER_VERBOSITY Set the verbosity of the build in job's log (see levels{:target="_blank"}) info
DOCKER_OPTIONS If you want to use additional options{:target="_blank"}
CUSTOM_REGISTRIES_DESTINATIONS the list of your remote registries + image tags (see example below)
CONFIG_FILE CI variable file that contains the auths for kaniko
IMAGE_TAG The default tag for the docker image 1.21.1-4.1.3

Historique

v2.0.1

Import du template de R2Devops