一种基于源代码数据依赖分析的有效 Docker 镜像瘦身方法
An Effective Docker Image Slimming Approach Based on Source Code Data Dependency Analysis
AI总结:
针对 Docker 镜像冗余及环境依赖提取不完整问题,提出 δ-SCALPEL,通过静态数据依赖分析和命令链表建模实现镜像瘦身,最高可减小 61.4%。
摘要:
容器化是当前软件开发的主流,它使软件能够跨平台使用,而无需额外配置运行环境。然而,开发人员创建的许多镜像存在冗余,包含不必要的代码、软件包和组件。这种过剩不仅导致镜像臃肿,给传输和存储带来负担,还会增加攻击面,使其更容易受到安全威胁。因此,镜像瘦身已成为一个重要的关注领域。尽管如此,现有镜像瘦身技术仍面临挑战,尤其是在项目代码所需环境依赖的提取不完整方面。本文提出了一种名为 δ-SCALPEL 的新型镜像瘦身模型。该模型采用静态数据依赖分析来提取项目代码的环境依赖,并利用一种称为命令链表的数据结构对镜像的文件系统进行建模。我们选择了 20 个 NPM 项目和两个 Docker Hub 官方镜像来构建数据集,以评估 δ-SCALPEL。评估结果表明,δ-SCALPEL 能够在确保这些项目正常运行的同时,将镜像大小最多减少 61.4%。
英文摘要:
Containerization is the mainstream of current software development, which enables software to be used across platforms without additional configuration of running environment. However, many images created by developers are redundant and contain unnecessary code, packages, and components. This excess not only leads to bloated images that are cumbersome to transmit and store but also increases the attack surface, making them more vulnerable to security threats. Therefore, image slimming has emerged as a significant area of interest. Nevertheless, existing image slimming technologies face challenges, particularly regarding the incomplete extraction of environment dependencies required by project code. In this paper, we present a novel image slimming model named δ-SCALPEL. This model employs static data dependency analysis to extract the environment dependencies of the project code and utilizes a data structure called the command linked list for modeling the image's file system. We select 20 NPM projects and two official Docker Hub images to construct a dataset for evaluating δ-SCALPEL. The evaluation results show that δ-SCALPEL can reduce image sizes by up to 61.4% while ensuring the normal operation of these projects.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。