arrow
Return

DockerFill: Automatically Completing Dockerfile Code With Syntax-Aware Multi-Task Learning

delete2026-01-01
delete0
PRE
AI
Y
Yiwen Wu
Y
Yang Zhang *
T
Tao Wang
B
Bo Ding
H
Huaimin Wang
DOI:10.1109/TSE.2025.3632074delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
As a kind of infrastructure-as-code, Dockerfile specifies the structure and functionality of a built Docker image and thus plays an important role in the containerized software development process. Nowadays developers need to spend extra time and effort configuring their Dockerfiles in addition to their regular coding work, which requires knowledge and skills orthogonal to those entailed in other software-related experiences. Poorly written Dockerfile code often introduces errors and maintenance costs. However, little automated support is available for assisting developers in configuring Dockerfiles. In this study, we first conduct an online survey to investigate Docker developers' perceptions of Dockerfile writing, highlighting the needs and potential benefits of Dockerfile auto-completion techniques. Then, we introduce DockerFill, a pre-trained model based approach that provides completion suggestions for Dockerfile-specific code. DockerFill leverages multi-layer Transformer architecture with syntax-aware multi-task learning, which includes contextual file information and three pre-training tasks, i.e., masked language modeling, syntax type identification, and masked identifier prediction. To evaluate DockerFill's effectiveness, we collect a dataset of 6,350 high-quality real-world Dockerfiles. Our empirical results show that DockerFill provides up to 52.38% accuracy for token-level completion and 19.69% exact match for line-level completion, outperforming the baselines by 7.32%-37.67% and 1.97%-19.69%, respectively. Also, DockerFill obtains significantly higher human evaluation scores compared to the baselines.
Keywords:
Codes
Surveys
Transformers
Writing
Training
Multitasking
Syntactics
Manuals
Containers
Accuracy
Dockerfile
transformer
code completion

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.9K
Citations:
1.1W

Organization

N
national university of defense technology - china
Scholars:
1.8W
Papers: 1.4W
Citations: 9
Cited Papers

Cited Papers

Finding A Needle in a Haystack: Automated Mining of Silent Vulnerability Fixes
err2021-11-01
err0
PREAI
errJiayuan Zhou; Michael Pacheco; Zhiyuan Wan; Xin Xia; David Lo; Yuan Wang; Ahmed E. Hassan
errShare
errSave
BLEU
err2001-01-01
err0
errOAAI
errKishore Papineni; Salim Roukos; Todd Ward; Wei-Jing Zhu
errShare
errSave
DevOps: Introducing Infrastructure-as-Code
err2017-05-01
err0
PREAI
errMatej Artac; Tadej Borovssak; Elisabetta Di Nitto; Michele Guerriero; Damian Andrew Tamburri
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
A unified multi-task learning model for AST-level and token-level code completion
err2022-04-18
err17
PREAI
errLiu, Fang; Li, Ge; Wei, Bolin; Xia, Xin; Fu, Zhiyi; Jin, Zhi
errShare
errSave
researcher View more