docker-local-build
Build and test Kurtosis from source on local Docker. Compiles all components (engine, core, files-artifacts-expander), builds Docker images, installs the CLI, and restarts the engine. Use when developing Kurtosis and testing changes locally with Docker.
Best use case
docker-local-build is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Build and test Kurtosis from source on local Docker. Compiles all components (engine, core, files-artifacts-expander), builds Docker images, installs the CLI, and restarts the engine. Use when developing Kurtosis and testing changes locally with Docker.
Build and test Kurtosis from source on local Docker. Compiles all components (engine, core, files-artifacts-expander), builds Docker images, installs the CLI, and restarts the engine. Use when developing Kurtosis and testing changes locally with Docker.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "docker-local-build" skill to help with this workflow task. Context: Build and test Kurtosis from source on local Docker. Compiles all components (engine, core, files-artifacts-expander), builds Docker images, installs the CLI, and restarts the engine. Use when developing Kurtosis and testing changes locally with Docker.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/docker-local-build/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How docker-local-build Compares
| Feature / Agent | docker-local-build | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Build and test Kurtosis from source on local Docker. Compiles all components (engine, core, files-artifacts-expander), builds Docker images, installs the CLI, and restarts the engine. Use when developing Kurtosis and testing changes locally with Docker.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Docker Local Build Build all Kurtosis components from source and test them locally on Docker. ## Overview This skill builds the full Kurtosis stack for local Docker testing: - **Engine** — Docker image `kurtosistech/engine` - **Core (APIC)** — Docker image `kurtosistech/core` - **Files Artifacts Expander** — Docker image `kurtosistech/files-artifacts-expander` - **CLI** — binary at `.tmp/kurtosis`, installed to `/usr/local/bin/kurtosis` All images are tagged with the current git short SHA (+ `-dirty` if uncommitted changes exist) via `scripts/get-docker-tag.sh`. The same tag is compiled into the CLI as `KurtosisVersion`. ## Quick build (recommended) Run the wrapper script from the repo root. It handles version generation, image builds, CLI compilation, installation, and engine reset: ```bash ./scripts/local-build.sh ``` ### Environment variables | Variable | Default | Description | |----------|---------|-------------| | `INSTALL_PATH` | `/usr/local/bin/kurtosis` | Where to install the CLI binary | | `BUILD_IMAGES` | `true` | Set to `false` to skip Docker image builds (CLI only) | | `DEBUG_IMAGE` | `false` | Build debug images with delve debugger | | `PODMAN_MODE` | `false` | Use podman instead of docker | | `RESET_KURTOSIS_AFTER_BUILD` | `true` | Stop engine and clean containers after build | ### Examples ```bash # Full build + install + reset ./scripts/local-build.sh # CLI only (skip image builds) BUILD_IMAGES=false ./scripts/local-build.sh # Build with debug images DEBUG_IMAGE=true ./scripts/local-build.sh # Install to a custom path INSTALL_PATH=/tmp/kurtosis ./scripts/local-build.sh # Skip engine reset (keep running enclaves) RESET_KURTOSIS_AFTER_BUILD=false ./scripts/local-build.sh ``` ## Manual build (step by step) ### 1. Generate version constants ```bash ./scripts/generate-kurtosis-version.sh ``` This writes the git-based version tag into `kurtosis_version/kurtosis_version.go`. ### 2. Build Docker images The existing build scripts handle binary compilation, unit tests, and Docker image building: ```bash # Build engine image (compiles binary, runs tests, builds Docker image) ./engine/scripts/build.sh # Build core + files-artifacts-expander images ./core/scripts/build.sh ``` These scripts: - Detect the host architecture (amd64/arm64) - Cross-compile the Go binary for linux - Run unit tests - Build a Docker image tagged `kurtosistech/<component>:<git-sha>` - Use `scripts/docker-image-builder.sh` which creates a buildx builder, builds for the local platform with `--load`, and cleans up ### 3. Build the CLI ```bash go build -o .tmp/kurtosis ./cli/cli/ ``` ### 4. Install ```bash cp .tmp/kurtosis /usr/local/bin/kurtosis ``` ### 5. Reset the engine ```bash kurtosis engine stop || true docker ps -aq --filter "label=com.kurtosistech.app-id=kurtosis" | xargs -r docker rm -f docker ps -aq --filter "name=kurtosis-engine" | xargs -r docker rm -f docker ps -aq --filter "name=kurtosis-reverse-proxy" | xargs -r docker rm -f docker ps -aq --filter "name=kurtosis-logs-collector" | xargs -r docker rm -f docker ps -aq --filter "name=kurtosis-api--" | xargs -r docker rm -f ``` ### 6. Start and test ```bash kurtosis engine start kurtosis run github.com/ethpandaops/ethereum-package kurtosis clean -a ``` ## Key files | Component | Source | Dockerfile | Image | |-----------|--------|------------|-------| | Engine | `engine/server/engine/main.go` | `engine/server/Dockerfile` | `kurtosistech/engine` | | Core (APIC) | `core/server/api_container/main.go` | `core/server/Dockerfile` | `kurtosistech/core` | | Files Artifacts Expander | `core/files_artifacts_expander/main.go` | `core/files_artifacts_expander/Dockerfile` | `kurtosistech/files-artifacts-expander` | | CLI | `cli/cli/main.go` | N/A | N/A | | Version | `kurtosis_version/kurtosis_version.go` | N/A | N/A | | Version generator | `scripts/generate-kurtosis-version.sh` | N/A | N/A | | Docker tag | `scripts/get-docker-tag.sh` | N/A | N/A | | Image builder | `scripts/docker-image-builder.sh` | N/A | N/A | ## Iterating After making code changes: 1. Re-run `./scripts/local-build.sh` (or set `BUILD_IMAGES=false` if only CLI changed) 2. The version tag changes automatically with each commit (SHA-based) 3. If you have uncommitted changes, the tag gets a `-dirty` suffix ## Common issues | Symptom | Fix | |---------|-----| | `go build` fails with import errors | Run `go mod tidy` in the failing module directory | | Docker build fails with `.dockerignore` error | Ensure `.dockerignore` exists in the component's server directory | | Engine starts but uses old images | The tag is SHA-based; make sure the built image tag matches `kurtosis version` output | | `webapp directory not found` warning | Normal when building without enclave-manager; an empty placeholder is created automatically | | buildx builder conflict | Remove stale builders: `docker buildx rm kurtosis-docker-builder` and `docker context rm kurtosis-docker-builder-context` | | Version mismatch between CLI and engine | Rebuild everything from the same commit; version is compiled into the CLI binary |
Related Skills
docker-debug
Debug Kurtosis running on local Docker. Inspect engine, API container, and service logs. Diagnose container crashes, port conflicts, and networking issues. Use when kurtosis commands fail or services aren't reachable on Docker.
cli-local-build
Build and test the Kurtosis CLI from source. Compile the CLI binary locally, run it against Docker or Kubernetes engines, and iterate on CLI changes without creating a release. Use when developing or debugging CLI commands.
starlark-dev
Develop and debug Kurtosis Starlark packages. Create packages from scratch, understand the plan-based execution model, use print() debugging, handle future references, and test packages locally. Use when writing or troubleshooting .star files.
service-manage
Manage services in Kurtosis enclaves. Add, inspect, stop, start, remove, update services. View logs, shell into containers, and execute commands. Use when you need to interact with running services.
run-package
Run Starlark scripts and packages with kurtosis run. Covers all flags including dry-run, args-file, parallel execution, image download modes, verbosity levels, and production mode. Use when executing Kurtosis packages locally or from GitHub.
portal
Manage Kurtosis Portal for remote context access. Start, stop, and check status of the Portal daemon that enables communication with remote Kurtosis servers. Use when working with remote Kurtosis contexts.
port-forward
View and manage port mappings for Kurtosis services. Check which local ports map to service ports and troubleshoot connectivity. Use when services aren't reachable or you need to find the right port.
lint
Lint and format Kurtosis Starlark files. Check syntax, validate docstrings, and auto-format .star files. Use when writing or reviewing Starlark packages to ensure code quality.
k8s-dev-deploy
Build, push, and deploy Kurtosis dev images to a Kubernetes cluster without creating a release. Rebuilds engine, core, and files-artifacts-expander as multi-arch Docker images with a unique tag, pushes to the logged-in user's Docker Hub, and restarts the engine. Use when testing local code changes on a k8s cluster.
k8s-debug-pods
Debug Kurtosis pods on Kubernetes. Diagnose why pods are Pending, CrashLoopBackOff, ImagePullBackOff, or Evicted. Check node taints, tolerations, resource pressure, and pod events. Use when kurtosis engine start fails or pods aren't coming online.
k8s-clean-cluster
Force-clean all Kurtosis resources from a Kubernetes cluster when kurtosis clean hangs or fails. Removes all kurtosis namespaces, pods, daemonsets, cluster roles, and cluster role bindings. Use when kurtosis clean -a hangs or leaves behind orphaned resources.
import-compose
Import Docker Compose files into Kurtosis. Convert docker-compose.yml to Starlark packages or run them directly. Use when migrating existing Docker Compose workflows to Kurtosis.