Anthropic's Claude Code, run unattended in Swale workflows. Backs the claude-code task.
332
Swale-built image backing the claude-code task definition. It runs
Claude Code, Anthropic's coding agent, once and
unattended in a directory the caller names, and emits the agent's final answer
as a task output. It is built to run that task and is not meant to be run on
its own.
node:24-trixie-slim@anthropic-ai/claude-code, unmodified, at the version pinned in the
Dockerfile,
plus git and ripgrepswale (uid 1000)DISABLE_AUTOUPDATER, DISABLE_TELEMETRY,
DISABLE_ERROR_REPORTING), so a task runs the version the image pinsWORKDIR /mnt/workspace, ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]The entrypoint takes no arguments. It reads the task's inputs from the platform's
INPUT_* environment variables, changes into INPUT_DIRECTORY and runs
claude --print with the prompt as one argument and stdin closed:
| Input env | Effect |
|---|---|
INPUT_PROMPT | The instructions, passed as a single argument. Required. |
INPUT_DIRECTORY | The full path the agent works in. Required. |
INPUT_MODEL | The model, passed as --model. Required. |
INPUT_API_KEY | Exported as ANTHROPIC_API_KEY when set. Pass a secret. |
INPUT_BASE_URL | Exported as ANTHROPIC_BASE_URL when set: your own gateway to Claude. |
INPUT_PERMISSION | read: no edits and no commands (--permission-mode manual). edit (default): file edits, no commands (acceptEdits). full: everything (bypassPermissions). Anything that would ask for approval is refused. |
INPUT_RESULT_PATH | When set, the final answer is also written to this file. |
INPUT_MAX_MINUTES | The run stops after this many minutes (default 60) and the task fails. |
The wrapper sets the API key and base URL only when they are given, so any other way of signing in that the run's environment provides still works.
After a successful run, the entrypoint appends
result=<the final answer as a JSON string>
to $WORKFLOW_TASK_OUTPUT. The consuming task must declare a result output.
Each tag is the version of Claude Code the image packages, such as 2.1.331. A
rebuild that keeps that version, to pick up a fixed base image or wrapper,
adds -r1, -r2, and so on. A tag is never reused; latest follows the
newest publish.
From the repository root:
docker build -t swaleio/claude-code:dev images/claude-code
Merging a change under images/claude-code publishes the image under its next
tag; task definitions reference it by digest.
Built from images/claude-code in the
swaleio/task-definitions repository. For how a task definition
references an image, see the
task definition reference
in the Swale documentation.
Claude Code is a product of Anthropic. This image is built by Swale; Anthropic does not build, endorse or support it.
The Dockerfile and entrypoint are covered by the
MIT License.
Claude Code is not open source: Anthropic licenses it under its own terms, and
your use of it is subject to them. A copy of its license is inside the image at
/usr/share/licenses/claude-code/LICENSE.md; see
Third-party software.
This image also contains software from other projects, each under its own
license. The license texts those projects ship are inside the image:
/usr/share/doc/<package>/copyright for Debian packages and
/usr/local/LICENSE for Node.js. Source code for its GPL and LGPL components:
https://snapshot.debian.org/package/<source-package>/<version>/https://github.com/oven-sh/WebKit/tree/<commit> and
Bun's TinyCC at https://github.com/oven-sh/tinycc/tree/<commit>, where each
<commit> is the one the binary names.We also provide that source code on request: see Third-party software.
docker pull swaleio/claude-code:latest