Add standard OCI container metadata labels to Dockerfile and CI workflows
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 70/100
调研方向
从 Dockerfile 的最终运行时阶段开始,即基于 mcr.microsoft.com/dotnet/aspnet:10.0 的那个阶段,在其中添加 org.opencontainers.image.* 的 LABEL 行。然后查看 .github/workflows/docker-image.yml 中的 build-and-push 步骤,以及 .github/workflows/docker-ghcr.yml 中的 labels 块,扩展现有标签或改用 docker/metadata-action。当镜像带有标准标签且工作流会发布这些标签时即完成,可以对本地构建的镜像使用 docker inspect 进行检查。
由索引模型根据 Issue 内容生成。
描述
The problem
Currently, GrandNode container images are missing standard Open Container Initiative (OCI) image specification labels:
- In
Dockerfile, the final runtime image stage (mcr.microsoft.com/dotnet/aspnet:10.0) contains no metadata labels. - In
.github/workflows/docker-image.yml, the build-and-push step sends no labels to Docker Hub. - In
.github/workflows/docker-ghcr.yml, only a partial set of labels (source,version,revision,description) is provided, omitting standard fields liketitle,url,vendor, andlicenses.
As a result:
- Registries (such as Docker Hub and GitHub Container Registry) do not display standard project metadata, vendor information, or direct links to documentation.
- Container vulnerability scanners (e.g., Trivy, Grype, Snyk) and cluster auditing tools cannot inspect standardized license (
GPL-3.0) or provenance metadata from the container image manifest.
Proposed solution
Add standard OCI image annotations (org.opencontainers.image.*) following the OCI Image Specification:
- In
Dockerfile(runtime stage):
LABEL org.opencontainers.image.title="GrandNode" \
org.opencontainers.image.description="GrandNode e-commerce platform" \
org.opencontainers.image.url="https://grandnode.com" \
org.opencontainers.image.documentation="https://docs.grandnode.com" \
org.opencontainers.image.source="https://github.com/grandnode/grandnode2" \
org.opencontainers.image.vendor="GrandNode" \
org.opencontainers.image.licenses="GPL-3.0"
- In CI Workflows (
.github/workflows/docker-image.ymland.github/workflows/docker-ghcr.yml): Attach dynamic build metadata (revision,version,created) when publishing, or leveragedocker/metadata-actionto generate standard OCI tags and labels consistently across registries.
Contribution
- I would like to submit a pull request for this.
- 主要语言
- C#
- 星标
- 1.3k
- 派生
- 549
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 65
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
grandnode/grandnode2 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 57/100
grandnode/grandnode2#900 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 65/100
grandnode/grandnode2#881 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
grandnode/grandnode2#880 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
grandnode/grandnode2#849 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 50/100
grandnode/grandnode2#499 ·
维护者通常 1 天内回复
查看 grandnode/grandnode2 的全部 Issue
相似的 Issue
-
Wrong values of Kernel32.FileShare.Delete and Kernel32.FileAttributes.PosixSemantics可能已有人在做 @ElectLive 今天认领。 未关闭bug good first issue help wanted
难度 1/5 1 小时以内 新手友好度 83/100
ForNeVeR/TruePath#241 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
files-community/Files#19047 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area:frontend bug FE hotspot:css P3
难度 2/5 1-3 小时 新手友好度 76/100
klasolsson81/jobbliggaren#2175 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 71/100
elsa-workflows/elsa-foundation#2965 ·
维护者通常 1 天内回复