kaliko updated
This commit is contained in:
22
README.md
22
README.md
@@ -2,7 +2,7 @@
|
||||
|
||||
A thin shim-wrapper around the official [Google Kaniko](https://cloud.google.com/blog/products/gcp/introducing-kaniko-build-container-images-in-kubernetes-and-google-container-builder-even-without-root-access) Docker image to make it behave like the [Drone Docker plugin](http://plugins.drone.io/drone-plugins/drone-docker/).
|
||||
|
||||
Example .drone.yml for Drone 1.0 (pushing to Docker Hub):
|
||||
Example .drone.yml for Drone 2.15 (pushing to Docker Hub):
|
||||
|
||||
```yaml
|
||||
kind: pipeline
|
||||
@@ -46,10 +46,6 @@ steps:
|
||||
|
||||
## Use `.tags` file for tagging
|
||||
|
||||
Similarily to official
|
||||
[drone-docker](https://github.com/drone-plugins/drone-docker) plugin you can use
|
||||
`.tags` file to embed some custom logic for creating tags for an image.
|
||||
|
||||
```yaml
|
||||
kind: pipeline
|
||||
name: default
|
||||
@@ -61,12 +57,18 @@ steps:
|
||||
- go get
|
||||
- go build
|
||||
- make versiontags > .tags
|
||||
|
||||
- name: publish
|
||||
image: banzaicloud/drone-kaniko
|
||||
settings:
|
||||
registry: registry.example.com
|
||||
repo: registry.example.com/example-project
|
||||
# tags: ${DRONE_COMMIT_SHA} <= it must be left undefined
|
||||
tags:
|
||||
- build-${DRONE_BUILD_NUMBER}
|
||||
- latest
|
||||
- latest-${DRONE_COMMIT_AUTHOR}
|
||||
- latest-${DRONE_BRANCH}-${DRONE_COMMIT_AUTHOR}
|
||||
- latest-${DRONE_BRANCH}
|
||||
username:
|
||||
from_secret: docker-username
|
||||
password:
|
||||
@@ -144,3 +146,11 @@ The very same example just pushing to GCR instead of Docker Hub:
|
||||
```bash
|
||||
docker run --net=host -it --rm -w /src -v $PWD:/cache -v $PWD:/src -e PLUGIN_REGISTRY=gcr.io -e PLUGIN_REPO=paas-dev1/drone-kaniko-test -e PLUGIN_TAGS=test -e PLUGIN_DOCKERFILE=Dockerfile.test -e PLUGIN_CACHE=true -e PLUGIN_JSON_KEY="$(<$HOME/google-application-credentials.json)" banzaicloud/drone-kaniko
|
||||
```
|
||||
|
||||
Build
|
||||
|
||||
```bash
|
||||
|
||||
docker buildx build --no-cache --platform linux/amd64 --push -t 1sept/drone-kaniko:latest -t 1sept/drone-kaniko:v1.9.1-debug .
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user