A Dockerfile defines a set of instructions to build Docker images, which can then be instantiated to support containerized applications. Recent studies have revealed a considerable amount of quality issues with Dockerfiles. In this paper, we propose a novel approach DRIVE (Dockerfiles Rule mIning and Violation dEtection) to mine implicit rules and detect potential violations of such rules in Dockerfiles. DRIVE firstly parses Dockerfiles and transforms them to an intermediate representation. It then leverages an efficient sequential pattern mining algorithm to extract potential patterns. With heuristic-based reduction and moderate human intervention, potential rules are identified, which can then be utilized to detect potential violations of Dockerfiles. DRIVE identifies 34 semantic rules and 19 syntactic rules including 9 new semantic rules which have not been reported elsewhere. Extensive experiments on real-world Dockerfiles demonstrate the efficacy of our approach.
翻译:一个 Docker 文件定义了一套建立 Docker 图像的指示, 然后可以即时进行, 以支持集装箱化应用。 最近的研究揭示了与 Docker 文件之间的大量质量问题 。 在本文中, 我们提出一种新的方法 : 驱动( Dockkerfiles rules mIning and victed dept deption), 用于在 Dockker 文件 中埋设隐含的规则, 并发现可能违反这些规则的情况 。 首先, 驱动 剖析 Docker 文件, 并将它们转换为中间代表 。 然后, 它会利用高效的顺序模式采掘算法来提取潜在的模式 。 在基于超常的减少和适度的人类干预下, 发现了潜在的规则, 从而可以用来探测 Dockcker 文件的潜在违规情况 。 Dextive 确定了34 语义规则和 19 合成规则, 包括9 新的语义规则, 在别处没有报告 。 在现实世界 Docker 文件上进行广泛的实验, 显示了我们的方法的有效性 。