Build Worker Images (build)

build is the main operational command for producing worker images and validating runtime registration.

Command shape

npx worker-cli build [-i|--interactive] [--push] [--test|--no-test] [--no-check] [--no-proxy] [--parallel[=N]] [worker-name]

Core behavior

  • Requires REGISTRY from environment.
  • Builds local image (--load) with tags:
    • <registry>/<prefix><worker>:<version>
    • <registry>/<prefix><worker>:latest
  • Runs consistency check before build unless --no-check.
  • Runs registration validation after build (default path).
  • Pushes multi-arch image (linux/amd64,linux/arm64) when --push is used.

Common examples

Build one worker locally

npx worker-cli build opc-reader

Interactive worker picker

npx worker-cli build --interactive

Build all workers sequentially

npx worker-cli build

Build all workers in parallel

npx worker-cli build --parallel
npx worker-cli build --parallel=6

Build + push release

npx worker-cli build opc-reader --push

Skip pre-checks for emergency/manual flow

npx worker-cli build opc-reader --no-check

[WARNING!report/QUALITY TRADEOFF] --no-check removes a major safety net. Use it only when you already validated consistency and version behavior elsewhere.

CI-oriented example

npx worker-cli consistency
npx worker-cli check
npx worker-cli build --parallel=4 --push

References

  • sdk/worker/repo-management/src/commands/build.ts
  • sdk/worker/repo-management/src/lib/build-helpers.ts