Drone plugin for building and publishing Docker images using kaniko + personal patches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
surtur 7eb35192c4
chore: bump kaniko to 1.6.0-debug
1 week ago
.github Working kaniko publish to docker 6 months ago
cmd option parsing logic: add fallback values 2 weeks ago
docker chore: bump kaniko to 1.6.0-debug 1 week ago
scripts feat: build {amd64,pure docker} only 2 weeks ago
.drone.yml feat: build {amd64,pure docker} only 2 weeks ago
.gitignore Initial kaniko docker 6 months ago
LICENSE Initial kaniko docker 6 months ago
README.md chore: add a README note about this repo 2 weeks ago
go.mod feat: build {amd64,pure docker} only 2 weeks ago
go.sum Working kaniko publish to docker 6 months ago
kaniko.go fix: temporary patch for kaniko on cgroup v2 hosts 2 weeks ago
kaniko_test.go Working kaniko publish to docker 6 months ago

README.md

drone-kaniko

Note: this is a remote working branch of https://github.com/drone/drone-kaniko
with my personal changes on top. GH would call it a "fork".
Development occurs in the dev branch while the main branch remains a
perfect clone of the remote main (as long as I keep it updated).

Drone kaniko plugin uses kaniko to build and publish Docker images to a container registry.

Build

Build the binaries with the following commands:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/linux/amd64/kaniko-docker ./cmd/kaniko-docker
go build -v -a -tags netgo -o release/linux/amd64/kaniko-gcr ./cmd/kaniko-gcr
go build -v -a -tags netgo -o release/linux/amd64/kaniko-ecr ./cmd/kaniko-ecr

Docker

Build the Docker images with the following commands:

docker build \
  --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
  --file docker/docker/Dockerfile.linux.amd64 --tag plugins/kaniko .

docker build \
  --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
  --file docker/gcr/Dockerfile.linux.amd64 --tag plugins/kaniko-gcr .

docker build \
  --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
  --file docker/ecr/Dockerfile.linux.amd64 --tag plugins/kaniko-ecr .

Usage

docker run --rm \
    -e PLUGIN_TAGS=1.2,latest \
    -e PLUGIN_DOCKERFILE=/drone/Dockerfile \
    -e PLUGIN_REPO=foo/bar \
    -e PLUGIN_USERNAME=foo \
    -e PLUGIN_PASSWORD=bar \
    -v $(pwd):/drone \
    -w /drone \
    plugins/kaniko:linux-amd64