Drone plugins > Kaniko ECR
amazon_ecr.svg

Kaniko ECR

by drone-plugins


The Kaniko ECR plugin can be used to build and publish images to the Amazon ECR registry, using the Kaniko image builder. Unlike the Docker ECR plugin, you are not required you to run your agent in privileged mode.

Example

kind: pipeline
name: default

steps:
- name: kaniko
  image: plugins/kaniko-ecr
  settings:
    access_key: a50d28f4dd477bc184fbd10b376de753
    secret_key: bc5785d3ece6a9cdefa42eb99b58986f9095ff1c
    region: us-east-1
    repo: bar
    registry: <account_id>.dkr.ecr.us-east-1.amazonaws.com

Properties

  • access_key

    stringrequired

    AWS access key.

    Secret recommended

    Default: none

  • secret_key

    stringrequired

    AWS secret key.

    Secret recommended

    Default: none

  • create_repository

    booleanoptional

    Create repository if it does not exist.

    Default: false

  • region

    stringoptional

    AWS region.

    Default: us-east-1

  • registry

    stringrequired

    authenticates to this registry

    Default: none

  • repo

    stringrequired

    repository name for the image

    Default: none

  • lifecycle_policy

    stringoptional

    filename of ecr lifecycle json policy.

    Default: none

  • repository_policy

    stringoptional

    filename of ecr repository json policy.

    Default: none

  • tags

    arrayoptional

    repository tags to apply to the image

    Default: none

  • dockerfile

    stringoptional

    path to the Dockerfile

    Default: Dockerfile

  • context

    stringoptional

    path to the context directory

    Default: git repo root

  • target

    stringoptional

    the build target to use, must be defined in the docker file

    Default: none

  • build_args

    arrayoptional

    custom arguments passed to docker build.

    Default: none