本文已被:浏览 2246次 下载 3185次
Received:March 11, 2016 Revised:April 05, 2016
Received:March 11, 2016 Revised:April 05, 2016
中文摘要: 在容器虚拟化中,主流的镜像构建方式是通过Dockerfile来构建的.然而,在使用Dockerfile构建镜像时存在着明显的不足:由于Dockerfile语言的复杂性,使用文本编辑方式没有提供有效的语法引导,没有对Dockerfile可能存在的错误进行有效的检测,导致构建容器镜像工作效率低下.此外,使用说明不完整的第三方镜像,无法有效的确定镜像的功能和使用方法,安全性也是第三方镜像所面临的一大挑战,这带来了容器镜像的重复利用率低下的问题.针对上述问题,在分析Dockerfile语法和统计分析Dockerfile常见错误以及深入研究Docker镜像存储机制的基础上,设计了一个面向Dockerfile的镜像构建工具,并使用了可视化编辑,错误检测,逆向分析等关键技术进行实现.该工具能够在镜像构建中提供有效的语法引导,对Dockerfile常见的错误进行有效检测,为了验证第三方镜像的功能和安全性,设计了一种由Docker镜像逆向生成Dockerfile的方式,用户可以通过Dockerfile完全了解第三方镜像的功能和使用方式,另外通过二次构建的方式也可一定程度上解决第三方镜像的安全性问题.
中文关键词: Docker镜像 错误检测 逆向工程 Dockerfile
Abstract:In container-based virtualization, the mainstream way to build images is Dockerfile. However, using Dockerfile to build images has the obvious deficiency:Because of complexity of the Dockerfile syntax, the way of editing with text does not provide effective guidance of syntax, and effective detection for common errors, which lead to low efficiency in building images. In addition, using the 3rd party images with no complete explanation, users can not completely understand the usage of images and security is also a challenge for the 3rd party images, this bring the difficulty to reuse images. To solve the above problem, based on analysising syntax of Dockerfile, statisticsing and analysising common errors and deeply studying on storage mechanism of Docker image, we design a tool for building Docker image on Dockerfile, which using technology of visual editing, error detection and reverse engineering. In view of the problems existing in building images, the tool can provide effective syntax guide, and detect the common errors effectively. In addition, in order to verify the usage and safety of the third party images, by reversing images to Dockerfile, users can fully understand usage of the third party images via Dockerfile, and through the way of second build, the tool can solve problem of safety of the third party images partly.
文章编号: 中图分类号: 文献标志码:
基金项目:国家自然科学基金(61402453);国家高技术研究发展(863)计划(2013AA041301)
引用文本:
耿朋,陈伟,魏峻.面向Dockerfile的容器镜像构建工具.计算机系统应用,2016,25(11):14-21
GENG Peng,CHEN Wei,WEI Jun.Tool for Building Docker Image on Dockerfile.COMPUTER SYSTEMS APPLICATIONS,2016,25(11):14-21
耿朋,陈伟,魏峻.面向Dockerfile的容器镜像构建工具.计算机系统应用,2016,25(11):14-21
GENG Peng,CHEN Wei,WEI Jun.Tool for Building Docker Image on Dockerfile.COMPUTER SYSTEMS APPLICATIONS,2016,25(11):14-21