cloudbear/api-oci
最新稳定版本:v1.0.0
Composer 安装命令:
composer require cloudbear/api-oci
包简介
README 文档
README
- Create OCI Archives with multi-architecture and multi-layer support. (no build system)
- Partially implemented API for OCI repositories.
Contributions are welcome!
Getting Started
# Single file
$image = OciArchive::fromFile(
name: ImageName::parse('gitlab.com/cloudbear/open-source/php-api-oci/example:latest'),
file: new ContentFile(ChangeTypes::Addition, '/readme.txt', 'My image'),
);
# Multi layer
$image = OciArchive::fromConfig(
ImageName::parse('gitlab.com/cloudbear/open-source/php-api-oci/example:latest'),
new Config(PlatformVariants::ARM_64BIT, layers: [
new Layer([
new ContentFile(ChangeTypes::Addition, '/readme.txt', 'I\'m ARM'),
]),
]),
new Config(PlatformVariants::X86_64, layers: [
new Layer([
new ContentFile(ChangeTypes::Addition, '/readme.txt', 'I\'m X86_64'),
]),
]),
);
# Pushing to registry
new Client(new Credentials(config('oci.username'), config('oci.password')))
->push($image);
# Create local tar
$image->create('my-image.tar.gz');
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-24