• Claude Code is Anthropic’s CLI agentic coding tool that speeds development via natural language commands. • Docker Model Runner (DMR) lets you run large language models locally with an Anthropic-compatible API. • Configure Claude Code to point to DMR by setting ANTHROPIC_BASE_URL to http://localhost:12434. • Enable TCP access in Docker Desktop to expose DMR on localhost:12434 for local usage. • Increase context size by repackaging models (e.g., gpt-oss) to 128K tokens using DMR. • Once configured, Claude Code sends all requests to the local DMR instance, keeping data private. • This setup reduces costs and gives full control over infrastructure and data privacy. • Ideal for developers wanting a cost‑effective, privacy‑first AI coding environment.
Article Summaries:
- We recently showed how to pair OpenCode with Docker Model Runner for a privacy-first, cost-effective AI coding setup. Today, we’re bringing the same approach to Claude Code, Anthropic’s agentic coding tool. This post walks through how to configure Claude Code to use Docker Model Runner, giving you full control over your data, infrastructure, and spend. Figure 1: Using local models like gpt-oss to power Claude Code What Is Claude Code? Claude Code is Anthropic’s command-line tool for agentic coding. It lives in your terminal, understands your codebase, and helps you code faster by executing rou
Sources: