Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 4 min read How-to mediumAdept

Getting Started with the Labs AI Tools for Devs Docker Desktop Extension

The Labs AI Tools for Devs Docker Desktop extension runs LLM prompts against local projects. Prompts are referenced by git ref or URL, or loaded as local files. A prompt is a markdown file with system and user sections, and project context such as languages and files is injected through mustache templates. Tools the LLM can call are defined as Docker images that get bind-mounted into the project and receive a JSON payload as their first argument. Sample prompts cover Dockerfile generation, runbooks, ESLint and Pylint fixes.

Assumes: Docker basicsLLM promptingfunction calling

Related posts

  • Using Docker AI Tools for Devs to Provide Context for Better Code Fixes

    Docker mediumAdept

    LLMs fix lint violations far better when given the surrounding code, so Docker Labs built a prompt-driven pipeline where each step runs in a container: Pylint produces a violation report, violations are loaded into SQLite, and Tree-sitter parses the project into an AST whose top-level statement ranges are indexed alongside the source. The LLM then queries this database (writing its own SQL from the schema) to retrieve the enclosing function for a violation before proposing a fix. This sidesteps context-window limits of reading whole files, and the same pattern generalizes to any tool that maps code locations to issues.

  • How to Create Dockerfiles with GenAI

    Docker mediumAdept

    Framing Dockerfile generation as an interaction between an LLM and tools, rather than a chat where the user supplies project details, produces much better results. An assistant given analyze_project, write_files and docker_scout_tag_recommendation functions, two anchoring instructions, and Markdown best-practice prompts for NPM projects generates a three-stage Dockerfile with current slim base images and npm cache mounts, instead of an outdated single-stage node:14 file. The full transcript shows the GPT-4 assistant recovering on its own from an invalid-JSON tool error. Docker is still testing whether this approach adapts to new project types more easily than code templates.

  • Run, Test, and Evaluate Models and MCP Locally with Docker + Promptfoo

    Docker mediumAdept

    Promptfoo, Docker Model Runner and Docker MCP Toolkit can be combined to evaluate LLM apps entirely on a dev machine. Three worked configs are shown. The first compares local Gemma3 against Claude Opus 4.1 using llm-rubric and similarity assertions, graded by local smollm3 and mxbai embeddings instead of OpenAI. The second tests MCP tools directly (GitHub, Fetch, Playwright, YouTube transcript) through the MCP gateway. The third red-teams a GitHub-summarizer agent with MCP, PII, BOLA and BFLA plugins plus jailbreak and prompt-injection strategies, which exposed a tool-discovery vulnerability that was fixed with a prompt guideline.

  • How to Build, Run, and Package AI Models Locally with Docker Model Runner

    Docker mediumAdept

    Docker Model Runner, enabled as a beta feature in Docker Desktop 4.40+, pulls GGUF-format LLMs from Docker Hub or Hugging Face and runs them locally via the `docker model` CLI or an OpenAI-compatible HTTP endpoint on localhost. The guide walks through enabling the feature, pulling, tagging and pushing models to a local registry, one-shot and interactive prompts, curl calls to the chat completions API, and packaging your own .gguf file with a license as an OCI artifact. Constraints noted: only GGUF is supported, one model is loaded at a time, and models unload after 5 minutes idle. Compose v2.35+ can declare models as services and inject connection URLs into dependent containers.

  • ReadMeAI: An AI-powered README Generator for Developers

    Docker mediumAdept

    ReadMeAI, an honorable mention from Docker's AI/ML Hackathon, generates a draft README from an uploaded code file and a short project description. It is a Node.js/Express app: the code and a prompt template go to Google's PaLM API, the Markdown that comes back is converted to HTML with showdown and rendered into an EJS editor view with live preview, and the result downloads as a zip of Markdown and HTML. The walkthrough covers the controller code, the project layout, and building and running the app with Docker.

The quest for software engineering knowledge.

Look:
Layout: