Sign inSign up

dronee/kaniko

By dronee

•Updated about 4 years ago

Image
0

5.0K

dronee/kaniko repository overview

⁠Kaniko Drone Plugin

Drone Plugin⁠ used to effeciently build images from Dockerfiles⁠ and publish them afterwards using Kaniko⁠. This is done by automatically enable Kaniko's caching⁠.

Additionaly if the $cache_dir is mounted as volume, Kaniko's warmer is used to preload base images for caching.

⁠Plugin's default behaviour:

⁠Plugin settings

  • registry: Use this registry for image publishing and layer caching (defaults to index.docker.io)
  • username: for registry, if authentication is needed
  • password: for registry, if authentication is needed
  • registry_mirror: registry with mirroring configured (defaults to index.docker.io)
  • repo: Use this repository name for image publishing (defaults to DRONE_REPO⁠)
  • verbosity: one of panic, fatal, error, warn, info, debug, trace (defaults to info)
  • context: custom build context (defaults to drone workspace⁠)
  • dockerfile: custom Dockerfile name (defaults to Dockerfile)
  • target: target build stage
  • cache_dir: custom image preloading directory (defaults to /cache)
  • cache_repo: custom caching repository (defaults to $repo/cache)
  • cache_ttl: custom ttl for image preloading and layer cache (defaults to 336h0m0s)
  • cache_images: comma-separated list of image names and tags to preload, if $cache_dir is mounted (defaults to $dockerfile parsing)
  • build_args: comma-separated list of key=value pairs, to be passed as build arguments
  • build_args_from_env: comma-separated list of enviroment variable keys, to be passed with their resolved values as build arguments
  • additional_labels: comma-separated list of key=value pairs, to be used as additional image labels
  • additional_tags: comma-separated list of tag names, to be used as additional image tag names
  • commit_sha_length: number, specifying the number of lettes to be used for image tag names (defaults to 8)
  • extra_opts: Passed to Kaniko directly and could be used to configure a insecure registry e.g. (--insecure --insecure-pull)

⁠Simple usage

kind: pipeline
type: docker
name: default

steps:
  - name: build
    image: dronee/kaniko
    settings:
      registry: registry.company.com
      username:
        from_secret: repository_username
      password:
        from_secret: repository_password

⁠Complex usage

kind: pipeline
type: docker
name: default

steps:
  - name: build
    image: dronee/kaniko
    settings:
      registry: registry.company.com
      cache_dir: /my-cache
      cache_repo: caches/my-repo
      repo: my-repo
      extra_opts: --insecure --insecure-pull
    volumes:
      - name: cache
        path: /my-cache

volumes:
  - name: cache
    host: 
      path: /tmp/kaniko

Tag summary

Content type

Image

Digest

sha256:7920c9f3f…

Size

30.1 MB

Last updated

about 4 years ago

docker pull dronee/kaniko