oras-project/oras-go

GitHub: oras-project/oras-go

一个符合 OCI 规范的 Go 库,用于在 registry、本地文件系统和内存之间统一推送、拉取和管理 OCI artifacts。

Stars: 266 | Forks: 111

# ORAS Go 库

ORAS logo

`oras-go` 是一个用于管理 OCI artifacts 的 Go 库,符合 [OCI Image Format Specification](https://github.com/opencontainers/image-spec) 和 [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec)。它提供了统一的 API,用于在兼容 OCI 的 registry、本地文件系统和内存存储中推送、拉取和管理 artifacts。 ## 入门指南 ### 概念 深入了解基本概念: - [Artifacts 建模](docs/Modeling-Artifacts.md) - [目标与内容存储](docs/Targets.md) ### 快速开始 按照分步教程使用 `oras-go` v2: - [快速开始:使用 `oras-go` v2 管理 OCI Artifacts](docs/tutorial/quickstart.md) ### 示例 查看 `oras-go` v2 常见用例的示例代码: - [Artifact 复制](https://pkg.go.dev/oras.land/oras-go/v2#pkg-examples) - [Registry 操作](https://pkg.go.dev/oras.land/oras-go/v2/registry#pkg-examples) - [Repository 操作](https://pkg.go.dev/oras.land/oras-go/v2/registry/remote#pkg-examples) - [身份验证](https://pkg.go.dev/oras.land/oras-go/v2/registry/remote/auth#pkg-examples) - [凭据管理](https://pkg.go.dev/oras.land/oras-go/v2/registry/remote/credentials#pkg-examples) 在 [pkg.go.dev](https://pkg.go.dev/oras.land/oras-go/v2) 查找更多 API 示例。 ## 版本控制 本项目遵循 [Semantic Versioning](https://semver.org/) (`MAJOR`.`MINOR`.`PATCH`),其中 `MAJOR` 用于破坏性更新,`MINOR` 用于向后兼容的新功能,而 `PATCH` 用于向后兼容的修复。 ## 分支 ### main(v3 开发) [![Build Status](https://github.com/oras-project/oras-go/actions/workflows/build.yml/badge.svg?event=push&branch=main)](https://github.com/oras-project/oras-go/actions/workflows/build.yml?query=workflow%3Abuild+event%3Apush+branch%3Amain) [![codecov](https://codecov.io/gh/oras-project/oras-go/branch/main/graph/badge.svg)](https://codecov.io/gh/oras-project/oras-go) [`main`](https://github.com/oras-project/oras-go/tree/main) 分支正在积极开发 `v3`,可能包含破坏性更新。**不建议在生产环境中使用。** ### v2(稳定版) [![Build Status](https://github.com/oras-project/oras-go/actions/workflows/build.yml/badge.svg?event=push&branch=v2)](https://github.com/oras-project/oras-go/actions/workflows/build.yml?query=workflow%3Abuild+event%3Apush+branch%3Av2) [![codecov](https://codecov.io/gh/oras-project/oras-go/branch/v2/graph/badge.svg)](https://codecov.io/gh/oras-project/oras-go) [![Go Report Card](https://goreportcard.com/badge/oras.land/oras-go/v2)](https://goreportcard.com/report/oras.land/oras-go/v2) [![Go Reference](https://pkg.go.dev/badge/oras.land/oras-go/v2.svg)](https://pkg.go.dev/oras.land/oras-go/v2) [`v2`](https://github.com/oras-project/oras-go/tree/v2) 分支包含最新的稳定版本,**建议在生产环境中使用**。 如果适用,`main` 分支上的新功能和 Bug 修复将被移植(backport)到 `v2`。 ### v1(维护模式) [![Build Status](https://github.com/oras-project/oras-go/actions/workflows/build.yml/badge.svg?event=push&branch=v1)](https://github.com/oras-project/oras-go/actions/workflows/build.yml?query=workflow%3Abuild+event%3Apush+branch%3Av1) [![codecov](https://codecov.io/gh/oras-project/oras-go/branch/v1/graph/badge.svg)](https://codecov.io/gh/oras-project/oras-go) [![Go Report Card](https://goreportcard.com/badge/oras.land/oras-go)](https://goreportcard.com/report/oras.land/oras-go) [![Go Reference](https://pkg.go.dev/badge/oras.land/oras-go.svg)](https://pkg.go.dev/oras.land/oras-go) [`v1`](https://github.com/oras-project/oras-go/tree/v1) 分支处于维护模式,仅接收依赖更新和安全修复。不计划添加任何新功能。 要从 `v1` 迁移到 `v2`,请参阅 [MIGRATION_GUIDE.md](MIGRATION_GUIDE.md)。 ## 社区 - 行为准则:[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) - 安全政策:[SECURITY.md](SECURITY.md) - 审查指南:[审查指南](https://github.com/oras-project/community/blob/main/REVIEWING.md) - Slack:CNCF Slack 上的 [`#oras`](https://cloud-native.slack.com/archives/CJ1KHJM5Z) 频道
标签:EVTX分析, Go库, 仓库交互, 制品管理, 容器镜像, 日志审计