Slightly modified kaniko executor docker image to run in GitLab CI. The image contains a helper script gitlab
, which adds a config file to connect to the GitLab-provided container registry as described in the GitLab docs.
# .gitlab-ci.yml
build:
stage: build
image:
name: technowledgy/kaniko-gitlab
script:
- gitlab
- /kaniko/executor --context "${CI_PROJECT_DIR}" -f Dockerfile -d "${CI_REGISTRY_NAME}:${CI_COMMIT_TAG}"
rules:
- if: $CI_COMMIT_TAG