mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-11 02:52:56 +01:00
1.6 KiB
1.6 KiB
registry.gitlab.com/gitlab-org/gitlab-build-images/kaniko
This is an image that wraps and extends kaniko. It contains the following tools:
- kaniko: A tool to build images in Docker / Kubernetes
- crane: A tool for managing container images (without the need to download them from registries)
- jq: a lightweight and flexible command-line JSON processor
With this image you can build images without the need for Docker-in-Docker.
The image is based on alpine:git, so you can utilize apk and git as well.
If you use this image in GitLab CI, it automatically logs in with credentials provided in GitLab CI.
Usage
GitLab Docs on usage of kaniko.
This image simplifies building with kaniko even further. /kaniko/executor and /kaniko/warmer are also
aliased to kaniko-executor and kaniko-warmer.
build:
stage: build
image: registry.gitlab.com/gitlab-org/gitlab-build-images/kaniko
script:
- >-
kaniko-executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
rules:
- if: $CI_COMMIT_TAG
Environment variables
BUILD_IMAGE_NO_MESSAGE: per default prints a message with version information, set this variable to suppress itBUILD_IMAGE_NO_AUTO_LOGIN: per default authenticating against the registry, set this variable to suppress this