You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository provides official Docker-maintained [reusable GitHub Actions workflows](https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows)
7
26
to securely build container images using Docker best practices. The workflows
@@ -10,13 +29,79 @@ the principles behind [Docker Hardened Images](https://docs.docker.com/dhi/),
10
29
enabling open source projects to follow a seamless path toward higher levels of
11
30
security and trust.
12
31
13
-
## :test_tube: Experimental
32
+
## Key Advantages
14
33
15
-
This repository is considered **EXPERIMENTAL** and under active development
16
-
until further notice. It is subject to non-backward compatible changes or
17
-
removal in any future version.
34
+
### Performance
35
+
36
+
***Native parallelization for multi-platform builds.**
37
+
Workflows automatically distribute builds across runners based on target
38
+
platform to be built, improving throughput for other architectures without
39
+
requiring emulation or custom CI logic or self-managed runners.
40
+
41
+
***Optimized cache warming & reuse.**
42
+
The builder uses the [GitHub Actions cache backend](https://docs.docker.com/build/cache/backends/gha/)
43
+
to persist layers across branches, PRs, and rebuilds. This significantly
44
+
reduces cold-start times and avoids repeating expensive dependency
45
+
installations, even for external contributors' pull requests.
46
+
47
+
***Centralized build infrastructure.**
48
+
Repositories no longer need to configure buildx drivers, tune storage, or
49
+
adjust resource limits. The reusable workflow abstracts this away and
50
+
guarantees fast, consistent builds across any project that opts in.
51
+
52
+
### Security
53
+
54
+
***Hardened multi-tenant builder with strict isolation.**
55
+
Builds execute in an environment maintained by Docker with stronger guarantees
56
+
than ephemeral CI runners. This reduces the attack surface and limits the
57
+
ability of repository authors to influence the build environment beyond
58
+
declared inputs.
59
+
60
+
***Verifiable, immutable sources.**
61
+
The trusted builder fetches source code using GitHub-provided OIDC identity
62
+
and the exact commit SHA. This ensures builds use the repository contents as
63
+
checked in—no CI step or workflow author can alter what is being built.
64
+
65
+
***Signed SLSA provenance for every build.**
66
+
BuildKit generates SLSA-compliant provenance attestation artifacts that are
67
+
signed and attached to the produced images or local artifacts. Downstream
68
+
consumers can verify:
69
+
- which commit produced the image
70
+
- what inputs and build parameters were used
71
+
- which builder executed the build
72
+
73
+
***Protection from CI tampering.**
74
+
The user workflow never executes `docker build` directly. Instead, it
75
+
delegates the build to a separate, trusted builder. This prevents untrusted
76
+
workflow steps from modifying the build environment, injecting unexpected
77
+
flags, or producing misleading provenance.
78
+
79
+
### Isolation & Reliability
80
+
81
+
***Strict separation between CI logic and build execution.**
82
+
The calling workflow orchestrates the build but does not execute it. It
83
+
cannot modify builder state, override provenance, or run `docker build`
84
+
locally with arbitrary flags or privileged access.
85
+
86
+
***Immutable, reproducible build pipeline.**
87
+
Builds run using declarative inputs only. This leads to:
88
+
- reproducibility (same inputs → same outputs)
89
+
- auditability (inputs and outputs recorded in provenance)
90
+
- reliability (no environment differences across CI runners or forks)
91
+
92
+
***Reduced CI variability and config drift.**
93
+
By relying on a centralized builder and reusable workflow, projects avoid
94
+
maintaining custom build logic per repository. Caching, provenance, SBOM
95
+
generation, and build settings behave uniformly across all adopters.
96
+
97
+
***Higher assurance for downstream consumers.**
98
+
Because artifacts are produced in a controlled environment with SLSA
99
+
provenance, consumers can trust images even from unknown or untrusted
100
+
repos—an essential part of supply-chain hardening.
101
+
102
+
## Usage
18
103
19
-
## Build reusable workflow
104
+
###Build reusable workflow
20
105
21
106
```yaml
22
107
name: ci
@@ -72,7 +157,7 @@ on:
72
157
73
158
You can find the list of available inputs in [`.github/workflows/build.yml`](.github/workflows/build.yml).
0 commit comments