Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update help doc with OCI layout support #997

Merged
merged 5 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/oras/root/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Example - Attach file 'hi.txt' and add manifest annotations:
Example - Attach file 'hi.txt' and export the pushed manifest to 'manifest.json':
oras attach --artifact-type doc/example --export-manifest manifest.json localhost:5000/hello:v1 hi.txt

Example - Attach file to the manifest tagged 'v1' in an OCI layout folder 'layout-dir':
Example - Attach file to the manifest tagged 'v1' in an OCI image layout folder 'layout-dir':
oras attach --oci-layout --artifact-type doc/example layout-dir:v1 hi.txt
`,
Args: cobra.MinimumNArgs(1),
Expand Down
4 changes: 2 additions & 2 deletions cmd/oras/root/blob/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func fetchCmd() *cobra.Command {
var opts fetchBlobOptions
cmd := &cobra.Command{
Use: "fetch [flags] {--output <file> | --descriptor} <name>@<digest>",
Short: "Fetch a blob from a remote registry",
Long: `Fetch a blob from a remote registry
Short: "Fetch a blob from a registry or an OCI image layout",
Long: `Fetch a blob from a registry or an OCI image layout

Example - Fetch a blob from registry and save it to a local file:
oras blob fetch --output blob.tar.gz localhost:5000/hello@sha256:9a201d228ebd966211f7d1131be19f152be428bd373a92071c71d8deaf83b3e5
Expand Down
6 changes: 3 additions & 3 deletions cmd/oras/root/blob/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func pushCmd() *cobra.Command {
var opts pushBlobOptions
cmd := &cobra.Command{
Use: "push [flags] <name>[@digest] <file>",
Short: "Push a blob to a remote registry",
Long: `Push a blob to a remote registry
Short: "Push a blob to a registry or an OCI image layout",
Long: `Push a blob to a registry or an OCI image layout

Example - Push blob 'hi.txt' to a registry:
oras blob push localhost:5000/hello hi.txt
Expand All @@ -67,7 +67,7 @@ Example - Push blob 'hi.txt' and output the prettified descriptor:
Example - Push blob without TLS:
oras blob push --insecure localhost:5000/hello hi.txt

Example - Push blob 'hi.txt' into an OCI layout folder 'layout-dir':
Example - Push blob 'hi.txt' into an OCI image layout folder 'layout-dir':
oras blob push --oci-layout layout-dir hi.txt
`,
Args: cobra.ExactArgs(2),
Expand Down
4 changes: 2 additions & 2 deletions cmd/oras/root/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ func copyCmd() *cobra.Command {
Example - Copy an artifact between registries:
oras cp localhost:5000/net-monitor:v1 localhost:6000/net-monitor-copy:v1

Example - Download an artifact into an OCI layout folder:
Example - Download an artifact into an OCI image layout folder:
oras cp --to-oci-layout localhost:5000/net-monitor:v1 ./downloaded:v1

Example - Upload an artifact from an OCI layout folder:
Example - Upload an artifact from an OCI image layout folder:
oras cp --from-oci-layout ./to-upload:v1 localhost:5000/net-monitor:v1

Example - Upload an artifact from an OCI layout tar archive:
Expand Down
6 changes: 3 additions & 3 deletions cmd/oras/root/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func discoverCmd() *cobra.Command {
var opts discoverOptions
cmd := &cobra.Command{
Use: "discover [flags] <name>{:<tag>|@<digest>}",
Short: "[Preview] Discover referrers of a manifest in the remote registry",
Long: `[Preview] Discover referrers of a manifest in the remote registry
Short: "[Preview] Discover referrers of a manifest in a registry or an OCI image layout",
Long: `[Preview] Discover referrers of a manifest in a registry or an OCI image layout

** This command is in preview and under development. **

Expand All @@ -69,7 +69,7 @@ Example - Discover all the referrers of manifest with annotations, displayed in
Example - Discover referrers with type 'test-artifact' of manifest 'hello:v1' in registry 'localhost:5000':
oras discover --artifact-type test-artifact localhost:5000/hello:v1

Example - Discover referrers of the manifest tagged 'v1' in an OCI layout folder 'layout-dir':
Example - Discover referrers of the manifest tagged 'v1' in an OCI image layout folder 'layout-dir':
oras discover --oci-layout layout-dir:v1
oras discover --oci-layout -v -o tree layout-dir:v1
`,
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/root/manifest/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Example - Fetch manifest from a registry with certain platform:
Example - Fetch manifest from a registry with prettified json result:
oras manifest fetch --pretty localhost:5000/hello:v1

Example - Fetch raw manifest from an OCI layout folder 'layout-dir':
Example - Fetch raw manifest from an OCI image layout folder 'layout-dir':
oras manifest fetch --oci-layout layout-dir:v1

Example - Fetch raw manifest from an OCI layout archive file 'layout.tar':
Expand Down
4 changes: 2 additions & 2 deletions cmd/oras/root/manifest/fetch_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func fetchConfigCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "fetch-config [flags] <name>{:<tag>|@<digest>}",
Aliases: []string{"get-config"},
Short: "Fetch the config of a manifest from a remote registry",
Long: `Fetch the config of a manifest from a remote registry
Short: "Fetch the config of a manifest from a registry or an OCI image layout",
Long: `Fetch the config of a manifest from a registry or an OCI image layout

Example - Fetch the config:
oras manifest fetch-config localhost:5000/hello:v1
Expand Down
6 changes: 3 additions & 3 deletions cmd/oras/root/manifest/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ func pushCmd() *cobra.Command {
var opts pushOptions
cmd := &cobra.Command{
Use: "push [flags] <name>[:<tag>[,<tag>][...]|@<digest>] <file>",
Short: "Push a manifest to remote registry",
Long: `Push a manifest to remote registry
Short: "Push a manifest to a registry or an OCI image layout",
Long: `Push a manifest to a registry or an OCI image layout

Example - Push a manifest to repository 'localhost:5000/hello' and tag with 'v1':
oras manifest push localhost:5000/hello:v1 manifest.json
Expand All @@ -77,7 +77,7 @@ Example - Push a manifest to repository 'localhost:5000/hello' and tag with 'tag
Example - Push a manifest to repository 'localhost:5000/hello' and tag with 'tag1', 'tag2', 'tag3' and concurrency level tuned:
oras manifest push --concurrency 6 localhost:5000/hello:tag1,tag2,tag3 manifest.json

Example - Push a manifest to an OCI layout folder 'layout-dir' and tag with 'v1':
Example - Push a manifest to an OCI image layout folder 'layout-dir' and tag with 'v1':
oras manifest push --oci-layout layout-dir:v1 manifest.json
`,
Args: cobra.ExactArgs(2),
Expand Down
6 changes: 3 additions & 3 deletions cmd/oras/root/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func pullCmd() *cobra.Command {
var opts pullOptions
cmd := &cobra.Command{
Use: "pull [flags] <name>{:<tag>|@<digest>}",
Short: "Pull files from remote registry",
Long: `Pull files from remote registry
Short: "Pull files from a registry or an OCI image layout",
Long: `Pull files from a registry or an OCI image layout

Example - Pull artifact files from a registry:
oras pull localhost:5000/hello:v1
Expand All @@ -76,7 +76,7 @@ Example - Pull files from a registry with certain platform:
Example - Pull all files with concurrency level tuned:
oras pull --concurrency 6 localhost:5000/hello:v1

Example - Pull artifact files from an OCI layout folder 'layout-dir':
Example - Pull artifact files from an OCI image layout folder 'layout-dir':
oras pull --oci-layout layout-dir:v1

Example - Pull artifact files from an OCI layout archive 'layout.tar':
Expand Down
6 changes: 3 additions & 3 deletions cmd/oras/root/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ func pushCmd() *cobra.Command {
var opts pushOptions
cmd := &cobra.Command{
Use: "push [flags] <name>[:<tag>[,<tag>][...]] <file>[:<type>] [...]",
Short: "Push files to remote registry",
Long: `Push files to remote registry
Short: "Push files to a registry or an OCI image layout",
Long: `Push files to a registry or an OCI image layout

Example - Push file "hi.txt" with media type "application/vnd.oci.image.layer.v1.tar" (default):
oras push localhost:5000/hello:v1 hi.txt
Expand Down Expand Up @@ -91,7 +91,7 @@ Example - Push file "hi.txt" with multiple tags:
Example - Push file "hi.txt" with multiple tags and concurrency level tuned:
oras push --concurrency 6 localhost:5000/hello:tag1,tag2,tag3 hi.txt

Example - Push file "hi.txt" into an OCI layout folder 'layout-dir' with tag 'test':
Example - Push file "hi.txt" into an OCI image layout folder 'layout-dir' with tag 'test':
oras push --oci-layout layout-dir:test hi.txt
`,
Args: cobra.MinimumNArgs(1),
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/root/repo/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Example - Show tags in the target repository with digest-like tags hidden:
Example - Show tags of the target repository that include values lexically after last:
oras repo tags --last "last_tag" localhost:5000/hello

Example - Show tags of the target OCI layout folder 'layout-dir':
Example - Show tags of the target OCI image layout folder 'layout-dir':
oras repo tags --oci-layout layout-dir

Example - Show tags of the target OCI layout archive 'layout.tar':
Expand Down
6 changes: 3 additions & 3 deletions cmd/oras/root/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func tagCmd() *cobra.Command {
var opts tagOptions
cmd := &cobra.Command{
Use: "tag [flags] <name>{:<tag>|@<digest>} <new_tag> [...]",
Short: "Tag a manifest in the remote registry",
Long: `Tag a manifest in the remote registry
Short: "Tag a manifest in a registry or an OCI image layout",
Long: `Tag a manifest in a registry or an OCI image layout

Example - Tag the manifest 'v1.0.1' in 'localhost:5000/hello' to 'v1.0.2':
oras tag localhost:5000/hello:v1.0.1 v1.0.2
Expand All @@ -52,7 +52,7 @@ Example - Tag the manifest 'v1.0.1' in 'localhost:5000/hello' to 'v1.0.2', 'late
Example - Tag the manifest 'v1.0.1' in 'localhost:5000/hello' to 'v1.0.1', 'v1.0.2', 'latest' with concurrency level tuned:
oras tag --concurrency 1 localhost:5000/hello:v1.0.1 v1.0.2 latest

Example - Tag the manifest 'v1.0.1' to 'v1.0.2' in an OCI layout folder 'layout-dir':
Example - Tag the manifest 'v1.0.1' to 'v1.0.2' in an OCI image layout folder 'layout-dir':
oras tag layout-dir:v1.0.1 v1.0.2
`,
Args: cobra.MinimumNArgs(2),
Expand Down