No description
  • Go 96.4%
  • Dockerfile 3.6%
Find a file
Jonas Leder 9dd6e2055f
All checks were successful
build / test (push) Successful in 46s
build / generate-sbom (push) Successful in 1m8s
build / build (push) Successful in 1m16s
helper: wait up to 180s for buildkitd (configurable), builder nodes can be busy
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 01:17:11 +01:00
.forgejo/workflows chore(deps): update https://code.forgejo.org/forgejo/upload-artifact action to v5 2026-11-17 23:40:41 +00:00
helper helper: wait up to 180s for buildkitd (configurable), builder nodes can be busy 2026-11-18 01:17:11 +01:00
Dockerfile Port builder to Forgejo Actions 2026-11-18 00:07:56 +01:00
Readme.md helper: wait up to 180s for buildkitd (configurable), builder nodes can be busy 2026-11-18 01:17:11 +01:00
renovate.json Migrate config renovate.json 2026-03-23 09:08:17 +01:00

Docker Build Container using buildkit

Rootless buildkit plus the build-image helper and trivy. It is the builder image behind the reusable workflows in infra/ci-snippets, which is the normal way to use it.

Image: <forgejo host>/infra/docker-build:master

What build-image does

  1. writes the registry login, starts rootless buildkitd
  2. builds for linux/amd64,linux/arm64 and pushes <image>:<tag> and <image>:<commit sha>
  3. writes image-hash.txt and the step outputs digest and image ($GITHUB_OUTPUT)
  4. scans image and repo with trivy: native JSON reports plus a table of HIGH/CRITICAL findings in the log

Environment

Forgejo Actions values are used when no override is set. GitLab CI CI_* variables still work as fallback.

Variable Default (Forgejo) Meaning
REGISTRY host of GITHUB_SERVER_URL registry host. Always set it on the k8s runner: there GITHUB_SERVER_URL is the internal cluster URL
REGISTRY_USER / REGISTRY_PASSWORD GITHUB_ACTOR / GITHUB_TOKEN registry login
IMAGE_NAME <registry>/<lowercase GITHUB_REPOSITORY> image without tag
IMAGE_TAG slug of the branch or tag, latest on the default branch tag
DEFAULT_BRANCH none branch that gets latest
DOCKERFILE_PATH Dockerfile path relative to the checkout
ARCHITECTURES amd64,arm64 comma separated
IMAGE_PUSH true false builds without push
BUILDKIT_ADDITIONAL_ARGS extra buildctl build arguments
REGISTRY_MIRROR docker.io mirror for buildkit
GOPROXY / GOPROXY_DISABLE https://goproxy.jonasled.dev,direct passed as build arg
TRIVY_SKIP / TRIVY_TIMEOUT false / 5m scan control
BUILDKIT_START_TIMEOUT 180s how long to wait for buildkitd
BUILDCTL_TTY false colored progress

Runner requirements

The buildkit runner label (flux repo, services/forgejo-runner) runs this image as non-root with seccomp and apparmor unconfined, not privileged. Workflows normally use it through infra/ci-snippets. The image contains node and git so actions/checkout works inside it. The kaniko bootstrap build in this repository needs no extra privileges.

This repository

.forgejo/workflows/build.yml runs the helper tests, builds this image with kaniko (the image cannot build itself on the first run) and creates the helper SBOM.