Commit 63f0e584 authored by Christophe Benz's avatar Christophe Benz
Browse files

Use kaniko to build Docker images

parent 7a8e580d
Pipeline #1641 passed with stages
in 4 minutes and 49 seconds
......@@ -16,25 +16,12 @@ Build Docker image:
- Dockerfile.ci
refs:
- master
image: docker:19.03.1
services:
- docker:19.03.1-dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
# Create the certificates inside this directory for both the server
# and client. The certificates used by the client will be created in
# /certs/client so we only need to share this directory with the
# volume mount in `config.toml`.
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- docker info
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- docker build -t $CI_REGISTRY_IMAGE:latest -f Dockerfile.ci .
- docker push $CI_REGISTRY_IMAGE:latest
tags:
- docker-privileged
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile.ci --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
Generate files:
stage: generate
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment