.clawker.yaml and Clawker generates an optimized Dockerfile with caching, security, and Claude Code pre-installed.
Base Image
Thebuild.image field sets the base image. Alpine and Debian bases are both supported:
apt-get vs apk) accordingly.
System Packages
Install system packages with thepackages field:
The @ Shortcut
When you build a project image with clawker build, the resulting image is tagged as clawker-<project>:latest. The @ shortcut in commands resolves to this image:
Build Instructions
Theinstructions block provides type-safe Dockerfile directives. Each field maps to a Dockerfile instruction:
env
Set environment variables baked into the image:copy
Copy files into the image with optionalchown/chmod:
labels
Add metadata labels to the image:args
Define build-time arguments:root_run and user_run
Run commands during the build.root_run executes as root (before the USER switch), user_run executes as the container user (after the switch).
Both support OS-aware variants:
alpine or debian is specified, the command is skipped on the other OS.
Injection Points
For advanced use cases, theinject field provides raw Dockerfile injection points. Each field accepts an array of raw Dockerfile lines:
FROMbase imageafter_from— Base image tweaks, custom repos- Package installation
after_packages— Post-install configuration- User creation and setup
after_user_setup— User-level system configUSERswitch to non-rootafter_user_switch— Dotfiles, shell config- Claude Code installation
after_claude_install— Claude extensions, MCP toolsbefore_entrypoint— Final setupENTRYPOINT
Custom Dockerfile
For complete control, point to your own Dockerfile:image, packages, instructions, and inject fields are ignored. The Dockerfile is built as-is.
Build Context
Set a custom build context directory:context path is relative to the project root.
Build-time arguments can be passed via the --build-arg flag on clawker image build.