STAR: A Specialized Tagging Approach for Docker Repositories
Kang Yin, Wei Chen, Jiahong Zhou, Guoquan Wu, Jun Fang Wei · 2018
Docker images, having the idea of "build once, run anywhere", are widely used as the reusable delivery artifacts. Currently, there are a huge number of online Docker repositories that provide images as the off-the-shelf blocks to construct large and complicated systems. Tags would improve the reusability as they provide concise semantics. However, tags are not well supported for Docker images, and manual tagging is still exhausting. We propose STAR, a Specialized Tagging Approach for Docker Repositories, to address the problem of automatically multi-labeling the large number of repositories. STAR takes Dockerfiles of the repositories as the primary input, which because a Dockerfile contains all the instructions for building a Docker image. STAR is based on two prediction models. By taking a Dockerfile as the specific text description, we model a repository with its labeled tags and Dockerfile terms, and use Labeled Latent Dirichlet Allocation algorithm to recommend tags. By regarding a Dockerfile as the configuration code, we construct a feature model based on Dockerfile key instructions and use a similarity-based ranking algorithm to recommend tags. Given an untagged repository, STAR outputs two probability scores for each tag with the two models and takes a weighted sum of them as the final score. Finally, STAR ranks all the tags according to their scores and recommends the top K ones. We evaluate STAR on over 100,000 repositories of Docker Hub. The experimental results show that STAR outperforms the state-of-the-art approaches in terms of Recall@5 and Recall@10.