UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Dockerfile flakiness : characterization and repair ShabaniMirzaei, Taha

Abstract

Docker, a platform utilizing OS-level virtualization, packages applications into lightweight, portable images defined by instructions in a Dockerfile. However, the reliability of these Dockerfiles can be compromised by inconsistent and unpredictable behaviors, known as flakiness, which present significant challenges to the stability of Continuous Integration and Delivery (CI/CD) pipelines. This issue can lead to unreliable deployments and increased debugging efforts, yet it remains underexplored in current research. We conduct a systematic analysis of Dockerfile flakiness, presenting a comprehensive taxonomy of common flakiness categories, including dependency-related errors and server connectivity issues. Furthermore, we introduce FlakiDock, a tool leveraging large language models and retrieval-augmented generation techniques with dynamic analysis and an iterative feedback loop to automatically repair flaky Dockerfiles. Our evaluation shows that FlakiDock achieves a 73.55% repair accuracy, outperforming existing tools such as PARFUM by 12,581%, GPT-4-based prompting by 94.63%, and Llama3.1-based prompting by 110.87%. These results underscore the effectiveness of FlakiDock in addressing Dockerfile flakiness and improving build reliability.

Item Citations and Data

Rights

Attribution-NonCommercial-NoDerivatives 4.0 International