一句话:通过实证研究量化 14 种 Docker 坏味对 Docker 镜像大小的影响。
Docker 已成为广泛使用的应用打包与部署工具,它通过 Dockerfile 构建镜像。然而,编写最优 Dockerfile 并不容易,开发者常常偏离最佳实践,产生所谓的 Docker 坏味。本文针对 14 种 Docker 坏味开展实证研究,考察它们对 Docker 镜像大小的影响。研究旨在揭示哪些坏味会导致镜像体积膨胀,以及各坏味影响的相对程度,从而帮助开发者理解 Dockerfile 质量与镜像大小之间的关系,并为编写更精简的镜像、优化构建配置提供实证依据。
Docker, a widely adopted tool for packaging and deploying applications leverages Dockerfiles to build images. However, creating an optimal Dockerfile can be challenging, often leading to "Docker smells" or deviations from best practices. This paper presents a study of the impact of 14 Docker smells on the size of Docker images.