Shipwright: A Human-in-the-Loop System for Dockerfile Repair
Jordan Henkel, Denini Silva, Leopoldo Teixeira, Marcelo d'Amorim, Thomas W. Reps
Abstract
Docker is a tool for lightweight OS-level virtualization. Docker images are created by performing a build, controlled by a source-level artifact called a Dockerfile. We studied Dockerfiles on GitHub, and-to our great surprise-found that over a quarter of the examined Dockerfiles failed to build (and thus to produce images). To address this problem, we propose SHIPWRIGHT, a human-in-the-loop system for finding repairs to broken Dockerfiles. SHIPWRIGHT uses a modified version of the BERT language model to embed build logs and to cluster broken Dockerfiles. Using these clusters and a search-based procedure, we were able to design 13 rules for making automated repairs to Dockerfiles. With the aid of SHIPWRIGHT, we submitted 45 pull requests (with a 42.2% acceptance rate) to GitHub projects with broken Dockerfiles. Furthermore, in a "time-travel" analysis of broken Dockerfiles that were later fixed, we found that SHIPWRIGHT proposed repairs that were equivalent to human-authored patches in 22.77% of the cases we studied. Finally, we compared our work with recent, state-of-the-art, static Dockerfile analyses, and found that, while static tools detected possible build-failure-inducing issues in 20.6–33.8% of the files we examined, SHIPWRIGHT was able to detect possible issues in 73.25% of the files and, additionally, provide automated repairs for 18.9% of the files.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers6
- Automating Code-Related Tasks Through Transformers: The Impact of Pre-trainingRosalia Tufano, Luca Pascarella, Gabriele BavotaICSE 2023 · 15 citations
- Empirical Study of the Docker Smells Impact on the Image SizeThomas DurieuxICSE 2024 · 11 citations
- On the Reproducibility of Software Defect DatasetsHao-Nan Zhu, Cindy Rubio-GonzálezICSE 2023 · 10 citations
- Dockerfile Flakiness: Characterization and RepairTaha Shabani, Noor Nashid, Parsa Alian, Ali MesbahICSE 2025 · 2 citations
- Doctor: Optimizing Container Rebuild Efficiency by Instruction Re-orchestrationZhiling Zhu, Tieming Chen, Chengwei Liu, Han Liu et al.ISSTA 2025
Builds on2
Related papers
- Automatic Dockerfile Generation with Large Language ModelsJun Lyu, He Zhang, Yusong Yuan, Lanxin Yang et al.ICSE 2026
- Automating Dockerfile Refactoring to Multi-stage BuildsDongjin Chen, Wenhua Yang, Minxue Pan, Yu ZhouFSE 2026
- Towards Understanding Docker Build Faults in Practice: Symptoms, Root Causes, and Fix PatternsYiwen Wu, Yang Zhang, Tao Wang, Bo Ding et al.FSE 2025 · 4 citations
- Understanding and Predicting Docker Build Duration: An Empirical Study of Containerized Workflow of OSS ProjectsYiwen Wu, Yang Zhang, Kele Xu, Tao Wang et al.ASE 2022 · 13 citations
- Modus: a Datalog dialect for building container imagesChris Tomy, Tingmao Wang, Earl T. Barr, Sergey MechtaevFSE 2022 · 3 citations
