Skip to content

Commit

Permalink
fix: fix errors in manifest index examples (#1634)
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <[email protected]>
  • Loading branch information
wangxiaoxuan273 authored Feb 25, 2025
1 parent 555196b commit cbb255e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/oras/root/manifest/index/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Example - Create and push an index with annotations:
oras manifest index create localhost:5000/hello:v1 linux-amd64 --annotation "key=val"
Example - Create an index and push to an OCI image layout folder 'layout-dir' and tag with 'v1':
oras manifest index create layout-dir:v1 linux-amd64 sha256:99e4703fbf30916f549cd6bfa9cdbab614b5392fbe64fdee971359a77073cdf9
oras manifest index create --oci-layout layout-dir:v1 linux-amd64 sha256:99e4703fbf30916f549cd6bfa9cdbab614b5392fbe64fdee971359a77073cdf9
Example - Create an index and save it locally to index.json, auto push will be disabled:
oras manifest index create --output index.json localhost:5000/hello linux-amd64 linux-arm64
Expand Down
3 changes: 3 additions & 0 deletions cmd/oras/root/manifest/index/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ Example - Merge manifests from the index 'v2-windows' to the index 'v2':
Example - Update an index and tag the updated index as 'v2.1.0' and 'v2':
oras manifest index update localhost:5000/hello@sha256:99e4703fbf30916f549cd6bfa9cdbab614b5392fbe64fdee971359a77073cdf9 --add linux-amd64 --tag "v2.1.0" --tag "v2"
Example - Update an index and push to an OCI image layout folder 'layout-dir' and tag with 'v2':
oras manifest index update --oci-layout layout-dir@99e4703fbf30916f549cd6bfa9cdbab614b5392fbe64fdee971359a77073cdf9 --add linux-arm64 --tag "v2"
Example - Update an index and save it locally to index.json, auto push will be disabled:
oras manifest index update --output index.json localhost:5000/hello:v2 --add v2-linux-amd64
Expand Down

0 comments on commit cbb255e

Please sign in to comment.