oras push
Push files to a registry or an OCI image layout
oras push [flags] <name>[:<tag>[,<tag>][...]] <file>[:<type>] [...]
Examples
Push file "hi.txt" with media type "application/vnd.oci.image.layer.v1.tar" (default):
oras push localhost:5000/hello:v1 hi.txt
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
Push file "hi.txt" with the custom media type "application/vnd.me.hi":
oras push localhost:5000/hello:v1 hi.txt:application/vnd.me.hi
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
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
Push file "hi.txt" with config type "application/vnd.me.config":
oras push --image-spec v1.0 --artifact-type application/vnd.me.config localhost:5000/hello:v1 hi.txt
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
Push file to the insecure registry:
oras push --insecure localhost:5000/hello:v1 hi.txt
Push file to the HTTP registry:
oras push --plain-http localhost:5000/hello:v1 hi.txt
Push repository with manifest annotations:
oras push --annotation "key=val" localhost:5000/hello:v1
Push repository with manifest annotation file:
oras push --annotation-file annotation.json localhost:5000/hello:v1
Push file "hi.txt" with multiple tags:
oras push localhost:5000/hello:tag1,tag2,tag3 hi.txt
Push file "hi.txt" with multiple tags and concurrency level tuned:
oras push --concurrency 6 localhost:5000/hello:tag1,tag2,tag3 hi.txt
Push file "hi.txt" into an OCI image layout folder 'layout-dir' with tag 'test':
oras push --oci-layout layout-dir:test hi.txt
Options
-a, --annotation stringArray manifest annotations
--annotation-file string path of the annotation file
--artifact-type string artifact type
--ca-file string server certificate authority file for the remote registry
--cert-file string client certificate file for the remote registry
--concurrency int concurrency level (default 5)
--config path path of image config file
-d, --debug output debug logs (implies --no-tty)
--disable-path-validation skip path validation
--export-manifest path path of the pushed manifest
--format string [Experimental] Format output using a custom template:
'json': Print in JSON format
'go-template': Print output using the given Go template
-H, --header stringArray add custom headers to requests
-h, --help help for push
--identity-token string registry identity token
--identity-token-stdin read identity token from stdin
--image-spec string [Preview] specify manifest type for building artifact. Options: v1.1, v1.0 (default v1.1, overridden to v1.0 if --config is used without --artifact-type)
--insecure allow connections to SSL registry without certs
--key-file string client private key file for the remote registry
--no-tty [Preview] do not show progress output
--oci-layout set target as an OCI image layout
-p, --password string registry password or identity token
--password-stdin read password from stdin
--plain-http allow insecure connections to registry without SSL check
--registry-config path path of the authentication file for registry
--resolve host:port:address[:address_port] customized DNS for registry, formatted in host:port:address[:address_port]
--template string [Experimental] Template string used to format output
-u, --username string registry username
-v, --verbose verbose output