or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
ORAS migrating to OCI Reference types
Status: Work-in-progress
Version: draft
Overview
The two PRs of working group proposal for reference types were merged recently and will be released in Image-spec v1.1 and distribution-spec v1.1.0. See below two PRs for reference types:
This document describes the changes, manifest, and fallback use cases for ORAS-go library and ORAS CLI when migrating to OCI reference types.
Solution and Plan
ORAS
will support only OCI artifact in the near future and fall back to use OCI Image manifest with asubject
property if a registry doesn't support OCI artifact. There is no plan to support both ORAS artifact and OCI artifact in the sameORAS
release. The last version ofORAS-go
supporting ORAS artifact isv2.0.0-rc.3
, and the last version ofORAS CLI
supporting ORAS artifact is0.15.x
.Check below table for the timeline of releases supporting OCI artifact:
ORAS-go supports reference types
Changes are required for the following use cases:
Pushing Manifests with Subject
Follow the spec Pushing Manifests with Subject
Discovering Referrers
Follow the spec Listing Referrers
Deleting Manifests
Follow the spec Deleting Manifests
ORAS CLI supports reference types
ORAS push command
A new flag is introduced with the name
--compatibility={none,min,max}
, so that users can change the default pushing behavior.min
(default value), pushing OCI artifact manifests to a registry, if the response is400 Bad Request
, fallback to pushing OCI image manifest.none
, no fallback procedure is triggered for pushing OCI artifact manifests. Push fails if the response is400 Bad Request
.max
, OCI image manifests are pushed instead of OCI artifact manifests.Should follow below steps:
ORAS pull command
No changes
ORAS attach command
A new flag is introduced with the named
--compatibility={none,min,max}
, so that users can change the default pushing behavior.min
(default value), OCI artifact manifest withsubject
field is attached, if the response is400 Bad Request
, fallback to attaching OCI image manifest withsubject
field.none
, no fallback procedure is triggered for attaching OCI artifact manifests. Attaching fails if the response is400 Bad Request
.max
, OCI image manifests are attached instead of OCI artifact manifests.If the referrers API returns a 404, use the same logic as
ORAS-go
Pushing Manifests with Subject.Should follow below steps:
ORAS manifest fetch
No changes
ORAS manifest Push
Pushing manifests with subject
If the referrers API returns a 404, use the same logic as
ORAS-go
Pushing Manifests with Subject.When pushing an OCI artifact manifests with
subject
field,if the response is400 Bad Request
, by default, fallback to pushing an OCI image manifest withsubject
field. Fallback procedure can be disabled using a new flag named--strict
.When user pushes an OCI Image manifest with
subject
field,by default, image index is updated, user can disable updating image index using the new flag--strict
.Pushing manifests without subject
No changes when pushing an OCI image manifest without
subject
field.When pushing an OCI artifact manifests without a
subject
field,if the response is400 Bad Request
, by default, fallback to pushing an OCI image manifest without asubject
field. Fallback procedure can be disabled using a new flag named--strict
(flag name is tentative).ORAS manifest Delete
By default, only supplied manifest is deleted.
Use a new flag named
-r, --recursive
to deletereferrer
manifests recursively. See below example, by using the flag-r, --recursive
, when deletingsubject
manifest, manifestA
,B
,C
are deleted, and image index are updated.Use a new flag
--strict
to disable updating image index.ORAS blob
No changes
ORAS tag
No changes
ORAS repository
referrers tag schema
may mess the results oforas repository list
, so a new flag could be introduced to filter outreferrers tag schema
from the results.ORAS discover
The same logic as
ORAS-go
discover referrers.ORAS copy from target A to target B (include extended copy)
ORAS
doesn't perform manifest conversion, so copy succeeds only if both target A and target B support the type of manifest being copied.