1
0
mirror of https://github.com/docker/docs.git synced 2026-10-25 06:09:46 +03:00
Files
docs/content/guides/claude-code-model-runner.md
David Karlsson f02e2a5633 Revamp the guides section: taxonomy, single-page structure, and new landing/filter UX (#25338)
## What

A full revamp of the `/guides` section — taxonomy, structure, and UX.

Preview: https://deploy-preview-25338--docsdocker.netlify.app/guides/

### Taxonomy & structure
- Replaces the sprawling 24-tag set with a focused 9-tag taxonomy
aligned to use case / SDLC: **Languages & frameworks, AI, Testing,
CI/CD, Security, Databases, Deployment, Admin, Hands-on labs**.
- Removes the languages taxonomy entirely (`data/languages.yaml` and all
`languages:` front matter).
- Collapses all multi-page guide series into single pages, with aliases
so old sub-page URLs continue to resolve.
- Deletes redirect-only shim pages and flattens directory-wrapped single
pages.

### Landing page (`/guides/`)
- A clean index: hero, then category sections listing each guide as a
plain **title / summary** row.
- **Browse rail** (sticky, left): click a topic to filter the page to
just that topic's guides; "All guides" resets. A count + Clear bar
appears while filtering.
- **Text filter**: instant client-side search over title, summary, and
tags. Topic filter and text search are mutually exclusive and share the
same flat-list view.
- No more "Featured guides" section.

### Guide content pages
- Removes the left sidebar for the guides section (mobile drawer kept).
- Centered reading column (`92ch`) with the TOC taking the remaining
width.
- Summary rendered as a lead paragraph under the h1.
- TOC scrollbar auto-hides until hover; breadcrumbs render at a
consistent size inside and outside `prose`.

## Notes
- Deep full-text search across guide bodies is still handled by the
existing site-wide Pagefind (⌘K); the landing filter is the fast
metadata-narrowing surface.
- `series.html` is retained — it's still used by `get-started` pages.

## Validation
- Site builds clean locally (Hugo dev server, no errors / broken refs).
- All collapsed sub-page URLs redirect via aliases.

## Follow-ups

- Prune guides that we no longer need/want
- Tighten the guides that span too many concepts (e.g. language guides;
remove cicd/deploy/sscs)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 10:47:10 +02:00

4.5 KiB

title, description, summary, keywords, params
title description summary keywords params
Use Claude Code with Docker Model Runner Configure Claude Code to use Docker Model Runner so you can code with local models. Connect Claude Code to Docker Model Runner with the Anthropic-compatible API, package `gpt-oss` with a larger context window, and inspect requests. ai, claude code, docker model runner, anthropic, local models, coding assistant
tags time
ai
10 minutes

This guide shows how to run Claude Code with Docker Model Runner as the backend model provider. You'll point Claude Code at the local Anthropic-compatible API, run a coding model, and package gpt-oss with a larger context window for longer repository prompts.

Acknowledgment

Docker would like to thank Pradumna Saraf for his contribution to this guide.

In this guide, you'll learn how to:

  • Pull a coding model and start Claude Code with Docker Model Runner
  • Make the endpoint configuration persistent
  • Verify the local API endpoint and inspect requests
  • Package gpt-oss with a larger context window for longer prompts

Prerequisites

Before you start, make sure you have:

If you use Docker Desktop, turn on TCP access in Settings > AI, or run:

$ docker desktop enable model-runner --tcp 12434

Step 1: Pull a coding model

Pull a model before you start Claude Code:

$ docker model pull ai/devstral-small-2

You can also use ai/qwen3-coder if you want another coding-focused model with a large context window.

Step 2: Start Claude Code with Docker Model Runner

Set ANTHROPIC_BASE_URL to your local Docker Model Runner endpoint when you run Claude Code.

On macOS or Linux:

$ ANTHROPIC_BASE_URL=http://localhost:12434 claude --model ai/devstral-small-2

On Windows PowerShell:

$env:ANTHROPIC_BASE_URL="http://localhost:12434"
claude --model ai/devstral-small-2

Claude Code now sends requests to Docker Model Runner instead of Anthropic's hosted API.

Step 3: Troubleshoot your first launch

If Claude Code can't connect, check Docker Model Runner status:

$ docker model status

If Claude Code can't find the model, list local models:

$ docker model ls

If the model is missing, pull it first. If needed, use the fully qualified model name, such as ai/devstral-small-2.

Step 4: Make the endpoint persistent

To avoid setting the environment variable each time, add it to your shell profile:

export ANTHROPIC_BASE_URL=http://localhost:12434

On Windows PowerShell, add it to your PowerShell profile:

$env:ANTHROPIC_BASE_URL = "http://localhost:12434"

After you reload your shell, you can run Claude Code with only the model flag:

$ claude --model ai/devstral-small-2

Step 5: Verify the API endpoint

Send a test request to confirm the Anthropic-compatible API is reachable:

$ curl http://localhost:12434/v1/messages \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ai/devstral-small-2",
    "max_tokens": 32,
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

For more details about the request format, see the Anthropic-compatible API reference.

Step 6: Inspect Claude Code requests

To inspect the requests Claude Code sends to Docker Model Runner, run:

$ docker model requests --model ai/devstral-small-2 | jq .

This helps you debug prompts, context usage, and compatibility issues.

Step 7: Package gpt-oss with a larger context window

ai/gpt-oss defaults to a smaller context window than coding-focused models. If you want to use it for repository-scale prompts, package a larger variant:

$ docker model pull ai/gpt-oss
$ docker model package --from ai/gpt-oss --context-size 32000 gpt-oss:32k

Then run Claude Code with the packaged model:

$ ANTHROPIC_BASE_URL=http://localhost:12434 claude --model gpt-oss:32k

Learn more