# plugin-kaniko A thin shim-wrapper around the official [Google Kaniko](https://github.com/GoogleContainerTools/kaniko) OCI image to make it behave similar to the [Drone Docker plugin](http://plugins.drone.io/drone-plugins/drone-docker/). This is a fork of the discontinued [`drone-kaniko`](https://github.com/banzaicloud/drone-kaniko) by banzaicloud. ## Example .woodpecker.yml (pushing to Docker Hub): ```yaml pipeline: build_and_release: image: gitea.mdg-hamburg.de/ci-tools/plugin-kaniko:debug pull: true settings: registry: registry.example.com # docker.io is the default registry repo: example-org/example-project tags: ${CI_COMMIT_SHA},awesometag,latest cache: true dockerfile: Containerfile username: from_secret: container_registry_username password: from_secret: container_registry_password ``` ## Example .drone.yml (pushing to Docker Hub): ```yaml kind: pipeline name: default steps: - name: build_and_release image: gitea.mdg-hamburg.de/ci-tools/plugin-kaniko settings: registry: registry.example.com # docker.io is the default registry repo: example-org/example-project tags: ${DRONE_COMMIT_SHA},awesometag,latest cache: true username: from_secret: docker-username password: from_secret: docker-password ``` ## Pushing to Google Cloud Registry: Instead of authenticating with username and password, you simply provide a json_key ```yaml ... settings: json_key: from_secret: google_gcr_key ... ``` ## Using auto-tag **Woodpecker-only feature** This uses the current git tag as the container destination tag. The `latest` tag is also appended. Optionally with the `tag_strip_v` a leading `v` can be stripped from the container tag. ```yaml ... settings: auto_tag: true tag_strip_v: false ... ```