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.
Dockerfile at the root of your build context as Dockerfile$(date -I'seconds')latest, if DRONE_BRANCH=DRONE_REPO_BRANCHx, x.y, x.y.z, if DRONE_SEMVER is given for tag eventsregistry: Use this registry for image publishing and layer caching (defaults to index.docker.io)username: for registry, if authentication is neededpassword: for registry, if authentication is neededregistry_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 stagecache_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 argumentsbuild_args_from_env: comma-separated list of enviroment variable keys, to be passed with their resolved values as build argumentsadditional_labels: comma-separated list of key=value pairs, to be used as additional image labelsadditional_tags: comma-separated list of tag names, to be used as additional image tag namescommit_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)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
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
Content type
Image
Digest
sha256:7920c9f3f…
Size
30.1 MB
Last updated
about 4 years ago
docker pull dronee/kaniko