EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Repairing Docker Smells with Large Language Models: An Empirical Study

Chenhui Zhang, Haiyan Wang, Junyi Zhu, Zhaoquan Gu, Le Wang

Applied Sciences · 07.07.2026 · 16 (13) · 6805

DOI: 10.3390/app16136805 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Applied Sciences, online erschienen am 07.07.2026. Verfasst von Chenhui Zhang und 4 weiteren Autor:innen. Die Arbeit nennt 26 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Shenzhen Science and Technology Program, Major Key Project of PCL, National Natural Science Foundation of China.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Docker simplifies application deployment, yet improperly written Dockerfiles often lead to suboptimal images with security and efficiency issues, termed “Docker smell”. Existing approaches for the identification and repair of Docker smells predominantly rely on expert-defined static rules, which exhibit notable limitations when addressing structurally complex or infrequent smells. This paper proposes a novel Detect–Guide–Repair (DGR) framework, which integrates rule-based smell detection with a context-aware repair mechanism driven by large language models (LLMs), enabling a more flexible and intelligent automated repair process. We systematically evaluated DGR on 417 real Dockerfiles from prominent GitHub projects. Experimental results show that DGR reduces the number of smells to 44.68% of the original while maintaining a build success rate of 89.20%, demonstrating significant improvements in both repair effectiveness and usability. Furthermore, we present three practical enhancement pathways: (1) a hybrid strategy combining rules and DGR to improve repair effectiveness further; (2) an automated error-correction mechanism to restore buildability; and (3) task-specific model fine-tuning to enable efficient deployment of smaller models. Collectively, these approaches provide a promising empirical foundation for automated Docker smell repair.

Förderung

  • Shenzhen Science and Technology Program
  • Major Key Project of PCL
  • National Natural Science Foundation of China

Zitieren

APA

Zhang, C., Wang, H., Zhu, J., Gu, Z., & Wang, L. (2026). Repairing Docker Smells with Large Language Models: An Empirical Study. Applied Sciences, 16(13), 6805. https://doi.org/10.3390/app16136805

Vancouver

Zhang C, Wang H, Zhu J, Gu Z, Wang L. Repairing Docker Smells with Large Language Models: An Empirical Study. Applied Sciences. 2026;16(13):6805. doi:10.3390/app16136805

BibTeX
@article{Zhang2026,
  author = {Zhang, Chenhui and Wang, Haiyan and Zhu, Junyi and Gu, Zhaoquan and Wang, Le},
  title = {Repairing Docker Smells with Large Language Models: An Empirical Study},
  journal = {Applied Sciences},
  year = {2026},
  volume = {16},
  number = {13},
  pages = {6805},
  doi = {10.3390/app16136805}
}
Kostenlos starten →