不仅仅是时间戳:Docker可重复性研究
It's Not Just Timestamps: A Study on Docker Reproducibility
AI总结:
研究发现Docker构建的可重复性受开发者控制因素影响显著,提出具体指南以提高容器构建的可重复性。
摘要:
可重复的容器构建承诺为软件供应链提供简单的完整性检查:通过Dockerfile重新构建镜像并比较哈希值。我们构建了一个Docker度量管道,并将其应用于包含Dockerfile的2000个GitHub仓库的分层样本。我们发现只有56%能够生成可构建的镜像,其中仅有2.7%在没有任何基础设施配置的情况下能够位级可重复。在修改基础设施配置后,位级可重复性提高了18.6%,但仍有78.7%的可构建Dockerfile无法重复。我们分析了剩余差异的根本原因,发现除了时间戳和元数据外,开发者控制的选择,如未清理的缓存、日志、文档和浮动版本,是不可重复的主要原因。我们从这些模式中推导出具体的Dockerfile指南,并讨论它们如何影响未来关于可重复容器的检查器和持续集成(CI)检查。
英文摘要:
Reproducible container builds promise a simple integrity check for software supply chains: rebuild an image from its Dockerfile and compare hashes. We build a Docker measurement pipeline and apply it to a stratified sample of 2,000 GitHub repositories that contained a Dockerfile. We found that only 56% produce any buildable image, and just 2.7% of those are bitwise reproducible without any infrastructure configurations. After modifying infrastructure configurations, we raise bitwise reproducibility by 18.6%, but 78.7% of buildable Dockerfiles remain non-reproducible. We analyze the root causes of the remaining differences, and find that beyond timestamps and metadata, developer-controlled choices such as uncleaned caches, logs, documentation, and floating versions are dominant causes of non-reproducibility. We derive concrete Dockerfile guidelines from these patterns and discuss how they can inform future linters and Continuous Integration (CI) checks for reproducible containers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。