论文标题

修复Dockerfile的气味:一项实证研究

Fixing Dockerfile Smells: An Empirical Study

论文作者

Rosa, Giovanni, Scalabrino, Simone, Oliveto, Rocco

论文摘要

背景。 DevOps工作流程中广泛采用了容器化技术。最常用的是Docker,它要求开发人员定义一个规范文件(Dockerfile)来构建用于创建容器的图像。编写Dockerfiles有几个最佳实践规则,但是开发人员并不总是遵循它们。违反这种做法(称为Dockerfile气味)可能会对Docker图像的可靠性和性能产生负面影响。先前的研究表明,Dockerfile的气味广泛扩散,并且缺乏自动工具来支持开发人员修复它们。但是,目前尚不清楚开发人员固定了哪些Dockerfile的气味,以及开发人员首先愿意在多大程度上解决气味。 客观的。我们的探索性研究的目的是双重的。首先,我们想了解哪些Dockerfiles的气味受到开发人员的更多关注,即在开源项目的历史上更频繁地固定。其次,我们想检查开发人员是否愿意接受旨在解决Dockerfile气味的更改(例如,由自动化工具生成),以了解他们是否在乎它们。 方法。在研究的第一部分中,我们将评估由940万独特的Dockerfiles组成的最先进数据集上的Dockerfile气味的生存能力。我们依靠一种最先进的工具(Hadolint)来检测Dockerfile在Dockerfile的演变过程中消失了哪种码头气味,我们将手动分析此类案例的大量样本,以了解开发人员是否固定了它们以及他们是否知道气味。在第二部分中,我们将在一组GitHub项目上检测Smelly Dockerfiles,我们将使用基于规则的工具自动修复它们。最后,我们将打开向开发人员提出修改的拉动请求,我们将对他们的结果进行定量和定性评估。

Background. Containerization technologies are widely adopted in the DevOps workflow. The most commonly used one is Docker, which requires developers to define a specification file (Dockerfile) to build the image used for creating containers. There are several best practice rules for writing Dockerfiles, but the developers do not always follow them. Violations of such practices, known as Dockerfile smells, can negatively impact the reliability and the performance of Docker images. Previous studies showed that Dockerfile smells are widely diffused, and there is a lack of automatic tools that support developers in fixing them. However, it is still unclear what Dockerfile smells get fixed by developers and to what extent developers would be willing to fix smells in the first place. Objective. The aim of our exploratory study is twofold. First, we want to understand what Dockerfiles smells receive more attention from developers, i.e., are fixed more frequently in the history of open-source projects. Second, we want to check if developers are willing to accept changes aimed at fixing Dockerfile smells (e.g., generated by an automated tool), to understand if they care about them. Method. In the first part of the study, we will evaluate the survivability of Dockerfile smells on a state-of-the-art dataset composed of 9.4M unique Dockerfiles. We rely on a state-of-the-art tool (hadolint) for detecting which Dockerfile smells disappear during the evolution of Dockerfiles, and we will manually analyze a large sample of such cases to understand if developers fixed them and if they were aware of the smell. In the second part, we will detect smelly Dockerfiles on a set of GitHub projects, and we will use a rule-based tool to automatically fix them. Finally, we will open pull requests proposing the modifications to developers, and we will quantitatively and qualitatively evaluate their outcome.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源