Skip to content

Commit

Permalink
doc: update example for oras push (#1102)
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
  • Loading branch information
qweeah authored Sep 1, 2023
1 parent 5e98cec commit b8db4fb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cmd/oras/root/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func pushCmd() *cobra.Command {
Example - Push file "hi.txt" with media type "application/vnd.oci.image.layer.v1.tar" (default):
oras push localhost:5000/hello:v1 hi.txt
Example - Push file "hi.txt" and export the pushed manifest to a specified path
Example - Push file "hi.txt" and export the pushed manifest to a specified path:
oras push --export-manifest manifest.json localhost:5000/hello:v1 hi.txt
Example - Push file "hi.txt" with the custom media type "application/vnd.me.hi":
Expand All @@ -68,8 +68,12 @@ Example - Push file "hi.txt" with the custom media type "application/vnd.me.hi":
Example - Push multiple files with different media types:
oras push localhost:5000/hello:v1 hi.txt:application/vnd.me.hi bye.txt:application/vnd.me.bye
Example - Push file "hi.txt" with artifact type "application/vnd.example+type":
oras push --artifact-type application/vnd.example+type localhost:5000/hello:v1 hi.txt
Example - Push file "hi.txt" with config type "application/vnd.me.config":
oras push --artifact-type application/vnd.me.config localhost:5000/hello:v1 hi.txt
oras push --image-spec v1.0 --artifact-type application/vnd.me.config localhost:5000/hello:v1 hi.txt
Example - Push file "hi.txt" with the custom manifest config "config.json" of the custom media type "application/vnd.me.config":
oras push --config config.json:application/vnd.me.config localhost:5000/hello:v1 hi.txt
Expand All @@ -80,10 +84,10 @@ Example - Push file to the insecure registry:
Example - Push file to the HTTP registry:
oras push --plain-http localhost:5000/hello:v1 hi.txt
Example - Push repository with manifest annotations
Example - Push repository with manifest annotations:
oras push --annotation "key=val" localhost:5000/hello:v1
Example - Push repository with manifest annotation file
Example - Push repository with manifest annotation file:
oras push --annotation-file annotation.json localhost:5000/hello:v1
Example - Push file "hi.txt" with multiple tags:
Expand Down

0 comments on commit b8db4fb

Please sign in to comment.