Skip to main content
Version: 1.3.0-beta.1

oras discover

[Preview] Discover referrers of a manifest in a registry or an OCI image layout ** This command is in preview and under development. **

oras discover [flags] <name>{:<tag>|@<digest>}

Examples

Discover referrers of manifest 'hello:v1' in registry 'localhost:5000', displayed in a tree view:

oras discover localhost:5000/hello:v1

Discover referrers via referrers API:

oras discover --distribution-spec v1.1-referrers-api localhost:5000/hello:v1

Discover referrers via tag scheme:

oras discover --distribution-spec v1.1-referrers-tag localhost:5000/hello:v1

[Experimental] Discover referrers and display in a table view:

oras discover localhost:5000/hello:v1 --format table

[Experimental] Discover referrers and format output with Go template:

oras discover localhost:5000/hello:v1 --format go-template --template "{{.manifests}}"

Discover all the referrers of manifest with annotations, displayed in a tree view:

oras discover -v localhost:5000/hello:v1

Discover referrers with type 'test-artifact' of manifest 'hello:v1' in registry 'localhost:5000':

oras discover --artifact-type test-artifact localhost:5000/hello:v1

Discover referrers of the manifest tagged 'v1' in an OCI image layout folder 'layout-dir':

oras discover --oci-layout layout-dir:v1

Options

      --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
-d, --debug output debug logs (implies --no-tty)
--distribution-spec string [Preview] set OCI distribution spec version and API option for target. Options: v1.1-referrers-tag, v1.1-referrers-api
--format string [Experimental] Format output using a custom template:
'table': Get direct referrers and output in table format
'json': Get direct referrers and output in JSON format
'go-template': Print direct referrers using the given Go template
'tree': Get referrers recursively and print in tree format (default "tree")
-H, --header stringArray add custom headers to requests
-h, --help help for discover
--identity-token string registry identity token
--identity-token-stdin read identity token from stdin
--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
--oci-layout-path string set the path for the OCI image layout target
-o, --output string [Deprecated] format in which to display referrers (table, json, or tree). tree format will also show indirect referrers (default "tree")
-p, --password string registry password or identity token
--password-stdin read password from stdin
--plain-http allow insecure connections to registry without SSL check
--platform os[/arch][/variant][:os_version] request platform in the form of os[/arch][/variant][:os_version]
--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 display full metadata of referrers