Docker is a tool for lightweight OS-level virtualization. Docker images are created by performing a build, controlled by a source-level artifact called a Dockerfile. We studied Dockerfiles on GitHub, and -- to our great surprise -- found that over a quarter of the examined Dockerfiles failed to build (and thus to produce images). To address this problem, we propose SHIPWRIGHT, a human-in-the-loop system for finding repairs to broken Dockerfiles. SHIPWRIGHT uses a modified version of the BERT language model to embed build logs and to cluster broken Dockerfiles. Using these clusters and a search-based procedure, we were able to design 13 rules for making automated repairs to Dockerfiles. With the aid of SHIPWRIGHT, we submitted 45 pull requests (with a 42.2% acceptance rate) to GitHub projects with broken Dockerfiles. Furthermore, in a "time-travel" analysis of broken Dockerfiles that were later fixed, we found that SHIPWRIGHT proposed repairs that were equivalent to human-authored patches in 22.77% of the cases we studied. Finally, we compared our work with recent, state-of-the-art, static Dockerfile analyses, and found that, while static tools detected possible build-failure-inducing issues in 20.6--33.8% of the files we examined, SHIPWRIGHT was able to detect possible issues in 73.25% of the files and, additionally, provide automated repairs for 18.9% of the files.
翻译:为解决这一问题,我们建议使用SHIPWRIGT, 即“人到行人”系统来寻找破碎的Docker文件的修理。SHIPWLEG 使用一个自动版本的 BERT 语言模型来嵌入建筑日志和破碎的 Docker 文件。我们研究了GitHub 上的Docker文件,并且 -- -- 令我们大吃一惊的 -- -- 发现超过四分之一的被检查的Docker文件未能建立(并因此生成图像)。为了解决这个问题,我们建议使用SHIPWRIGT, 这是一种用于寻找破碎的Docker文件的人工系统。SHIPWLLIGD 使用一个自动版本的自动版本来嵌入成日志和被破碎的 Docker 文件。我们用这些组和基于搜索的程序设计了13条规则来自动修理Docker文件。在SHIPRight中,我们用最近检测到的SRBYLELLA中, 1877 % 和我们用S-REFLLA 搜索了可能检测到的S-rightS-LALA中, 我们找到了的20-RELELELA中, 我们找到了的1877 和18-LA 和S-S-S-S-LILAFLLLA 找到了的修复文件,我们找到了中找到了的修复了。