Parfum: Detection and Automatic Repair of Dockerfile Smells

02/03/2023
by   Thomas Durieux, et al.
0

Docker is a popular tool for developers and organizations to package, deploy, and run applications in a lightweight, portable container. One key component of Docker is the Dockerfile, a simple text file that specifies the steps needed to build a Docker image. While Dockerfiles are easy to create and use, creating an optimal image is complex in particular since it is easy to not follow the best practices, when it happens we call it Docker smell. To improve the quality of Dockerfiles, previous works have focused on detecting Docker smells, but they do not offer suggestions or repair the smells. In this paper, we propose, Parfum, a tool that detects and automatically repairs Docker smells while producing minimal patches. Parfum is based on a new Dockerfile AST parser called Dinghy. We evaluate the effectiveness of Parfum by analyzing and repairing a large set of Dockerfiles and comparing it against existing tools. We also measure the impact of the repair on the Docker image in terms of build failure and image size. Finally, we opened 35 pull requests to collect developers' feedback and ensure that the repairs and the smells are meaningful. Our results show that Parfum is able to repair 806 245 Docker smells and have a significant impact on the Docker image size, and finally, developers are welcoming the patches generated by Parfum while merging 20 pull requests.

READ FULL TEXT
research
04/19/2020

Interactive Patch Filtering as Debugging Aid

It is widely recognized that program repair tools need to have a high pr...
research
08/30/2021

How to trust auto-generated code patches? A developer survey and empirical assessment of existing program repair tools

Automated program repair is an emerging technology that seeks to automat...
research
03/03/2021

Shipwright: A Human-in-the-Loop System for Dockerfile Repair

Docker is a tool for lightweight OS-level virtualization. Docker images ...
research
08/19/2022

Fixing Dockerfile Smells: An Empirical Study

Background. Containerization technologies are widely adopted in the DevO...
research
06/08/2020

ObjSim: Lightweight Automatic Patch Prioritization via Object Similarity

In the context of test case based automatic program repair (APR), patche...
research
08/28/2020

PCB Defect Detection Using Denoising Convolutional Autoencoders

Printed Circuit boards (PCBs) are one of the most important stages in ma...
research
05/12/2023

Where to Look When Repairing Code? Comparing the Attention of Neural Models and Developers

Neural network-based techniques for automated program repair are becomin...

Please sign up or login with your details

Forgot password? Click here to reset