Skip to content

Instantly share code, notes, and snippets.

@sontek
Created February 22, 2022 03:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sontek/76a6abe43601f09ba675b68d0dbca392 to your computer and use it in GitHub Desktop.
Save sontek/76a6abe43601f09ba675b68d0dbca392 to your computer and use it in GitHub Desktop.
Using kaniko in gitlab
build:python:image:
extends:
- .only-main-and-merges
dependencies:
- version
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
stage: build
before_script:
- mkdir -p /kaniko/.docker
- echo "{\"credsStore\":\"ecr-login\"}" > /kaniko/.docker/config.json
- export VERSION=$(cat VERSION)
script:
- echo $VERSION
- >
/kaniko/executor --context . --build-arg VERSION=$VERSION
--dockerfile docker/production/Dockerfile.ci-backend
--destination $DOCKER_SHA_IMAGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment