|
|
--- |
|
|
datasets: |
|
|
- name: dockerfiles-linted |
|
|
license: cc-by-4.0 |
|
|
language: |
|
|
- en |
|
|
tags: |
|
|
- dockerfile |
|
|
- hadolint |
|
|
- devops |
|
|
- github |
|
|
- software-engineering |
|
|
--- |
|
|
|
|
|
# Dockerfiles Linted Dataset |
|
|
|
|
|
This dataset contains 195,758 Dockerfiles collected from public container images found on Docker Hub. Each Dockerfile is enriched with metadata and statically analyzed using [Hadolint](https://github.com/hadolint/hadolint). |
|
|
|
|
|
## Dataset Overview |
|
|
|
|
|
Dockerfiles were collected by: |
|
|
1. Enumerating Docker Hub images, |
|
|
2. Extracting raw GitHub URLs pointing to Dockerfile locations in those repositories, |
|
|
3. Downloading each file and extracting content-level metadata (e.g. line count, validity), |
|
|
4. Fetching GitHub-level metadata such as license, stars, and path, |
|
|
5. Running Hadolint to detect Dockerfile best-practice violations. |
|
|
|
|
|
Each data entry includes: |
|
|
- Dockerfile content and metadata (hash, lines, valid), |
|
|
- GitHub repository context (repo URL, license, stars, branch), |
|
|
- Hadolint static analysis results. |
|
|
|
|
|
## Structure |
|
|
|
|
|
The dataset is split into 4 progressive stages: |
|
|
|
|
|
``` |
|
|
resolved/ → Resolved image ↔ raw Dockerfile URL mappings |
|
|
enriched/ → Dockerfile content + metadata (hash, lines, valid) |
|
|
full/ → Enriched with GitHub repository metadata |
|
|
linted/ → Final stage with Hadolint static analysis results |
|
|
summary/ → Visual summaries and statistics |
|
|
``` |
|
|
|
|
|
Each folder contains: |
|
|
- 20 partial `.jsonl` chunks (10k entries each), |
|
|
- 1 combined `*_all.jsonl` file for bulk use, |
|
|
- a `dataset_info.json` describing the data structure. |
|
|
|
|
|
## Bias Warning: CircleCI Dominance |
|
|
|
|
|
A very large portion of the Dockerfiles originate from the `circleci/circleci-dockerfiles` repository (170,000+ entries). |
|
|
To ensure clarity, we include **two sets of visualizations**: |
|
|
|
|
|
- **Full dataset statistics** |
|
|
- **Statistics with CircleCI excluded** |
|
|
|
|
|
This allows users to explore data either globally or more evenly across repositories. |
|
|
|
|
|
## Repository Distribution |
|
|
|
|
|
**Top 20 repositories by number of Dockerfiles (entire dataset):** |
|
|
|
|
|
 |
|
|
|
|
|
**Top 20 repositories (excluding CircleCI):** |
|
|
|
|
|
 |
|
|
|
|
|
## Hadolint Rule Violations |
|
|
|
|
|
**Top 20 Hadolint rules triggered (entire dataset):** |
|
|
|
|
|
 |
|
|
|
|
|
**Top 20 Hadolint rules (excluding CircleCI):** |
|
|
|
|
|
 |
|
|
|
|
|
## Example Entry |
|
|
|
|
|
Each row in the `.jsonl` files contains enriched information about a Dockerfile. |
|
|
The full field structure for each stage is documented in its respective `dataset_info.json`. |
|
|
|
|
|
## License |
|
|
|
|
|
This dataset is provided under the [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) license. |
|
|
|
|
|
## Attribution Notice |
|
|
|
|
|
This dataset contains Dockerfiles originally created by developers across many public GitHub repositories. |
|
|
We do not claim ownership of any individual Dockerfile. |
|
|
Instead, we provide this dataset as a collection of metadata, structure, and analysis, compiled and curated for research and educational use. |
|
|
|
|
|
Please consult individual repository licenses if you plan to reuse specific Dockerfile content in derived works. |
|
|
|