Update to Kaniko

This commit is contained in:
Comprofix 2023-12-31 16:00:15 +10:00
parent c35d041589
commit ba433e018a

View File

@ -23,18 +23,20 @@ eleventy:
- master - master
docker_build: docker_build:
before_script: #before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY # - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
services: #services:
- docker:dind # - docker:dind
stage: docker_build stage: docker_build
image: docker:latest image: gcr.io/kaniko-project/executor:latest
script: script:
- docker build --no-cache --pull -t $IMAGE_TAG . - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- docker push $IMAGE_TAG - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$IMAGE_TAG
- docker tag $IMAGE_TAG $IMAGE_TAG_LATEST #- docker build --no-cache --pull -t $IMAGE_TAG .
- docker push $IMAGE_TAG_LATEST #- docker push $IMAGE_TAG
- docker rmi $IMAGE_TAG $IMAGE_TAG_LATEST #- docker tag $IMAGE_TAG $IMAGE_TAG_LATEST
#- docker push $IMAGE_TAG_LATEST
#- docker rmi $IMAGE_TAG $IMAGE_TAG_LATEST
only: only:
- master - master