6.6 KiB
6.6 KiB
buildctl Plugin
A Woodpecker CI plugin for buildctl to build container images using a remote buildkit host. Also usable with Gitlab, Github or locally, see examples for usage.
Features
- preconfigured for reproduceable builds
- runnable with local docker daemon
Example
Woodpecker:
steps:
buildctl:
image: kokuwaio/buildctl
settings:
name:
- registry.example.org/foo:latest
- registry.example.org/foo:0.0.1
annotation:
org.opencontainers.image.title: My Image
org.opencontainers.image.description: A description.
platform: [linux/amd64, linux/arm64]
auth: {from_secret: AUTH}
Gitlab:
buildctl:
stage: lint
needs: []
image: kokuwaio/buildctl
variables:
PLUGIN_ADDR: tcp://0.8.1.5:1234
PLUGIN_NAME: registry.example.org/foo:latest,registry.example.org/foo:0.0.1
PLUGIN_PLATFORM: linux/amd64,linux/arm64
PLUGIN_AUTH: '{"auths":{"registry.example.org":{"auth":"changeMe}}}'
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes: [.buildctl.yaml, "**/*.y*ml"]
CLI (will reuse docker credentials of current user):
PLUGIN_ADDR=tcp://0.8.1.5:1234
PLUGIN_NAME=registry.example.org/foo:latest,registry.example.org/foo:0.0.1
PLUGIN_PLATFORM=linux/amd64,linux/arm64
docker run --rm --user=$(id -u) --volume=$HOME:$HOME:ro --workdir=$PWD --env=PLUGIN_ADDR --env=PLUGIN_NAME --env=PLUGIN_PLATFORM kokuwaio/buildctl
Settings
Alternatives
Image | Comment | amd64 | arm64 |
---|---|---|---|
kokuwaio/buildctl | Woodpecker plugin | ||
moby/buildkit | not a Woodpecker plugin | ||
nordseth/buildctl | not a Woodpecker plugin | ||
shopstic/buildctl | not a Woodpecker plugin, outdated | ||
agisoft/buildctl | not a Woodpecker plugin, outdated |