Kaniko
Plugin to build container images without root privileges
Settings can be defined using the settings
option for woodpecker plugins. All available settings and their defaults are listed below.
Settings
Settings Name | Default | Description |
---|---|---|
dry-run |
false |
disables docker push |
repo |
none | sets repository name for the image (can be a list) |
username |
none | sets username to authenticates with |
password |
none | sets password / token to authenticates with |
registry |
https://index.docker.io/v1/ |
sets docker registry to authenticate with |
dockerfile |
Dockerfile |
sets dockerfile to use for the image build |
tags |
none | sets repository tags to use for the image |
Advanced Settings
Settings Name | Default | Description |
---|---|---|
context |
. |
sets the path of the build context to use |
build-args |
none | sets custom build arguments for the build |
build-args-from-env |
none | forwards environment variables as custom arguments to the build |
auto-tag |
false |
if set generate .tags file, support format Major.Minor.Release or start with v docker tags: Major, Major.Minor, Major.Minor.Release and latest |
log-level |
info |
set different log level |
target |
none | indicate which build stage is the target build stage |
cache |
false |
use a cache repo |
cache-repo |
none | specify the cache repo |
cache-ttl |
none | set the time to live for the cache |
skip-tls-verify |
false |
ignore tls issues |
mirrors |
none | set docker hub mirrors |
json-key |
none | pass a json key to kaniko |
docker-config-json |
none | pass a docker config json to kaniko |
insecure |
false |
push images to a plain HTTP registry. |
insecure-pull |
false |
pull images from a plain HTTP registry. |
insecure-registry |
none | use plain HTTP requests when accessing the specified registry. |
destinations |
none | can specify multiple image names from repositories. This can be used in combination with docker-config-json when using multiple registries. |
Multi registry push example
ref. docker docs - Configuration files
settings:
# If "destinations" is specified, the following properties will be ignored.
# registry: https://index.docker.io
# username: your-account
# password:
# from_secret: your-password
# repo: your-account/name
# tags: dev
destinations:
- index.docker.io/v1/your-account/name:dev
- codeberg.org/company/project/your-account/name:prod
- codeberg.org/company/project/your-account/name:latest
docker_config_json:
from_secret: docker_config_json