A WoodpeckerCI plugin for buildctl to build container images using a remote builtkitd instance. https://hub.docker.com/r/kokuwaio/buildctl
  • Shell 73.6%
  • Dockerfile 26.4%
Find a file
Renovate 59f99fae6e
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
chore(deps): update kokuwaio/just docker tag from 1.50.0 to 1.51.0
2026-05-10 13:04:40 +00:00
.github chore: remove Github build, add woodpecker version tags 2025-07-07 11:40:20 +02:00
.woodpecker chore(deps): update kokuwaio/just docker tag from 1.50.0 to 1.51.0 2026-05-10 13:04:40 +00:00
.justfile chore(deps): update kokuwaio/just docker tag from 1.50.0 to 1.51.0 2026-05-10 13:04:40 +00:00
.markdownlint.yaml Initial draft of plugin. 2025-06-25 13:27:38 +02:00
.yamllint.yaml chore: remove Github build, add woodpecker version tags 2025-07-07 11:40:20 +02:00
Dockerfile chore(deps): update docker.io/library/bash:5.3.9 docker digest to 38697a8 2026-04-16 03:02:49 +00:00
Dockerfile.dockerignore Initial draft of plugin. 2025-06-25 13:27:38 +02:00
entrypoint.sh fix(buildctl): the --addr attribute belongs directly to buildctl and not the build command. see https://github.com/moby/buildkit?tab=readme-ov-file#building-a-dockerfile-with-buildctl 2026-01-25 19:29:03 +01:00
LICENSE Initial draft of plugin. 2025-06-25 13:27:38 +02:00
README.md fix: setting for reproducable builds was wrong 2026-04-27 16:46:54 +02:00
renovate.json fix: setting for reproducable builds was wrong 2026-04-27 16:46:54 +02:00

Buildctl WoodpeckerCI Plugin

pulls size dockerfile license prs issues

A WoodpeckerCI plugin for buildctl to build container images using a remote buildkit host.
Also usable with Gitlab, Github or locally, see examples for usage.

Features

Example

WoodpeckerCI:

steps:
  buildctl:
    depends_on: []
    image: kokuwaio/buildctl:v0.29.0
    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.
      build-args:
        NPM_CONFIG_REGISTRY: ${NPM_CONFIG_REGISTRY} # reused from ci env
        FOO: bar
      platform: [linux/amd64, linux/arm64]
      auth:
        registry.example.org:
          username: {from_secret: my_username}
          password: {from_secret: my_password}
        https://index.docker.io/v1/":
          username: {from_secret: docker_io_username}
          password: {from_secret: docker_io_password}

Gitlab: (using script is needed because of https://gitlab.com/gitlab-org/gitlab/-/issues/19717)

buildctl:
  needs: []
  stage: lint
  image:
    name: kokuwaio/buildctl:v0.29.0
    entrypoint: [""]
  script: [/usr/local/bin/entrypoint.sh]
  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: '{"registry.example.org":{"username":"my-user","password":"changeMe"}}'
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"

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

Settings Name Environment Default Description
addr PLUGIN_ADDR $BUILDKIT_HOST Buildkit host to use.
frontend PLUGIN_FRONTEND dockerfile.v0 Only dockerfile frontend supported right now
context PLUGIN_CONTEXT $PWD Context directory to use for build
dockerfile PLUGIN_DOCKERFILE Dockerfile Dockerfile to use.
target PLUGIN_TARGET none Dockerfile target
build-args PLUGIN_BUILD_ARGS none Build args to pass to build
platform PLUGIN_PLATFORM none Target platform for container image.
reproducible PLUGIN_REPRODUCIBLE true Build with reproducible settings.
source-date-epoch PLUGIN_SOURCE_DATE_EPOCH git log -1 --format="%at" Timestamp to use for reproducible builds.
name PLUGIN_NAME none Images names where to push the image.
annotation PLUGIN_ANNOTATION none Annotations (also known as labels) to add to image
push PLUGIN_PUSH true Push images if output names are set.
auth PLUGIN_AUTH none Auth for private registries
env-file PLUGIN_ENV_FILE none Source environment values from given file

Alternatives

Image Comment amd64 arm64
kokuwaio/buildctl Woodpecker plugin size size
moby/buildkit not a Woodpecker plugin size size
nordseth/buildctl not a Woodpecker plugin size size
shopstic/buildctl not a Woodpecker plugin, outdated size size
agisoft/buildctl not a Woodpecker plugin, outdated size size