DOCKSMITH: Scaling Reliable Coding Environments via an Agentic Docker Builder
Abstract
Reliable Docker-based environment construction is a dominant bottleneck for scaling execution-grounded training and evaluation of software engineering agents. We introduce DockSmith, a specialized agentic Docker builder designed to address this challenge. DockSmith treats environment construction not merely as a preprocessing step, but as a core agentic capability that exercises long-horizon tool use, dependency reasoning, and failure recovery, yielding supervision that transfers beyond Docker building itself. DockSmith is trained on large-scale, execution-grounded Docker-building trajectories produced by a SWE-Factory--style pipeline augmented with a loop-detection controller and a cross-task success memory. Training a 30B-A3B model on these trajectories achieves open-source state-of-the-art performance on Multi-Docker-Eval, with 39.72\% Fail-to-Pass and 58.28\% Commit Rate. Moreover, DockSmith improves out-of-distribution performance on SWE-bench Verified, SWE-bench Multilingual, and Terminal-Bench 2.0, demonstrating the broader agentic benefits of environment construction. Our model and Docker-building trajectories are publicly available at https://huggingface.co/JiaranZhang/DockSmith.
Lay Summary
AI coding assistants promise to automate software development, but they face a fundamental roadblock: before they can fix a bug or add a feature, they must first build a working environment for the project — installing the right libraries, tools, and dependencies. This setup step is surprisingly fragile and fails often, preventing AI from being trained and tested on real-world code at scale. We introduce DockSmith, an AI model trained specifically to master this environment setup challenge. Instead of treating setup as a quick preprocessing chore, we treat it as a complex reasoning task: our system learns from millions of real-world software projects on GitHub, studying how human developers successfully configured their environments. It uses two key tricks — remembering past solutions to reuse later, and detecting when it gets stuck in unproductive loops — to become progressively better at building working environments. DockSmith more than doubles the success rate of its base model and achieves state-of-the-art results among open-source systems. More importantly, the skills it learns — debugging, reasoning about dependencies, recovering from failures — transfer to other coding tasks, making AI programming assistants more reliable overall. Our model and training data are publicly available.