fix(content): harden Docker practice guide

This commit is contained in:
yeasy
2026-06-16 21:23:21 -07:00
parent f4e684afeb
commit 9fdffa9d91
67 changed files with 343 additions and 278 deletions
+3
View File
@@ -72,6 +72,8 @@ jobs:
ghcr.io/${{ github.repository }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: mode=max
sbom: true
```
关键说明
@@ -79,6 +81,7 @@ jobs:
* `docker/login-action` 负责认证支持 Docker HubGHCRECR 等主流 Registry
* `cache-from` / `cache-to` 使用 GitHub Actions 原生缓存`type=gha`无需额外配置即可加速增量构建
* 标签同时使用 commit hash `latest`兼顾版本追溯与部署便利
* `provenance: mode=max` `sbom: true` 会把构建来源证明和 SBOM 附加到推送的镜像上只做本地 `load: true` 的构建无法完整保留这些 attestation
### 21.2.3 最佳实践