一句话:通过分析 68 个 Docker 项目,揭示容器配置重构类型、技术债类别及最佳实践。
本文关注基于容器的 Docker 项目在演化与维护中缺乏对重构及其所缓解技术债的认识。作者对 68 个开源 Docker 项目(约 1950 万行代码)进行实证分析,并人工检查 193 个提交,归纳 Docker 与 Docker-compose 文件及普通源代码中的结构变更。结果表明,开发者重构 Docker 项目的原因多与容器的配置、组合和执行相关,催生了不同于既有重构领域的新技术债类别与重构类型。例如,缩小 Dockerfile 镜像、提升 Docker-compose 可扩展性以及常规代码重构,常伴随 Docker 和 Docker-compose 文件的演化。研究还提出 24 种 Docker 特定重构与技术债类别及若干最佳实践,帮助实践者、工具构建者和教育者提升 Docker 项目质量。
Software containers, such as Docker, are recently considered as the mainstream technology of providing reusable software artifacts. Developers can easily build and deploy their applications based on the large number of reusable Docker images that are publicly available. Thus, a current popular trend in industry is to move towards the containerization of their applications. However, container-based projects compromise different components including the Docker and Docker-compose files, and several other dependencies to the source code combining different containers and facilitating the interactions with them. Similar to any other complex systems, container-based projects are prone to various quality and technical debt issues related to different artifacts: Docker and Docker-compose files, and regular source code ones. Unfortunately, there is a gap of knowledge in how container-based projects actually evolve and are maintained.In this paper, we address the above gap by studying refactorings, i.e., structural changes while preserving the behavior, applied in open-source Docker projects, and the technical debt issues they alleviate. We analyzed 68 projects, consisting of 19,5 MLOC, along with 193 manually examined commits. The results indicate that developers refactor these Docker projects for a variety of reasons that are specific to the configuration, combination and execution of containers, leading to several new technical debt categories and refactoring types compared to existing refactoring domains. For instance, refactorings for reducing the image size of Dockerfiles, improving the extensibility of Docker-compose files, and regular source code refactorings are mainly associated with the evolution of Docker and Docker-compose files. We also introduced 24 new Docker-specific refactorings and technical debt categories, respectively, and defined different best practices. The implications of this study will assist practitioners, tool builders, and educators in improving the quality of Docker projects.
DOI 原文 ·
@inproceedings{paperbot6641,
title = {Refactorings and Technical Debt in Docker Projects: An Empirical Study},
author = {Emna Ksontini and Marouane Kessentini and Thiago do N. Ferreira and Foyzul Hassan},
booktitle = {ASE},
year = {2021},
doi = {10.1109/ase51524.2021.9678585}
}