A large number of software development practices show that container technology can effectively improve the efficiency and quality of software development,operation and maintenance.At present,Docker has become the container technology standard and one of the most popular container tools.Its configuration details and construction process contain a large number of best practices in software development,operation and maintenance.It is necessary to mine and analyze it to improve the efficiency and quality of software development,operation and maintenance.Base image is the key to the configuration and construction of container image.However,the dependency relationship between a large number of base images increase the complexity of image understanding;the limited search mechanism and the lack of image description information are not enough to support developers to configure a reasonable base image,which will eventually affect the efficiency and quality of image development.This thesis aims to empirically analyze the container dependency call mode to mine the characteristics of image,and recommend the base image to meet the development requirements for developers by characterizing the configuration code,so as to improve the efficiency of software development.The main research contents and contributions are described as follows:1.To solve the problem of dependency of container image,this thesis makes an empirical study on the structure,relationship and dependency characteristics of container images in open source projects.The empirical results show that: 1)The use of containers has a long tail effect,and a small number of container images have strong convergence and influence,especially LR(program language)and OS(operating system).2)There is a correlation between the connection strength of the two subnetworks and the category.The common subnetwork connection relationships include cooperation and substitution.3)There is a relationship between container image configuration instructions,and the configuration of functional instructions often depends on the base image.2.To solve the problem of difficult selection of container basic image,a DCCimage Rec method based on AST-path and neural network is proposed.Contributions include: 1)We find the difficult of selecting the base image in docker container development,and a DCCimage Rec method is proposed to realize the automatic recommendation of the base image.2)The semantic representation based on ASTpath can effectively capture structured information of Dockerfile.3)The neural network model based on hybrid coding and attention mechanism can be applied to train path data to realize the vector representation of configuration code,capture code’s semantic information and enhance the generalization ability of the model.3.Around the effectiveness evaluation of the container basic image recommendation method DCCimage Rec,we carry out baseline evaluation,model mechanism evaluation,practicality evaluation and tool implementation.Contributions include:1)DCCimagerec outperforms best baselines,improving Precision by 6.2%,Recall by 4.9% and F1 by 6.2%.2)All the model components of DCCimage Rec can boost total performance,and dynamic recommendation can be realized in a short time.3)DCCimage Rec Tool is implemented,which is the visualization tool for automatic recommendation of container base image. |