Skip to content

Commit

Permalink
chore: synchronize text from CLI for subcommands
Browse files Browse the repository at this point in the history
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
  • Loading branch information
TerryHowe committed May 19, 2024
1 parent a8285c6 commit d1bb93f
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 59 deletions.
9 changes: 4 additions & 5 deletions docs/commands/oras_blob_delete.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 20

# oras blob delete

Delete a blob from a remote registry.
Delete a blob from a remote registry

```bash
oras blob delete [flags] <name>@<digest>
Expand All @@ -22,14 +22,14 @@ oras blob delete localhost:5000/hello@sha256:9a201d228ebd966211f7d1131be19f152be
Delete a blob without prompting confirmation:

```bash
oras blob delete --yes localhost:5000/hello@sha256:9a201d228ebd966211f7d1131be19f152be428bd373a92071c71d8deaf83b3e5
oras blob delete --force localhost:5000/hello@sha256:9a201d228ebd966211f7d1131be19f152be428bd373a92071c71d8deaf83b3e5
```

Delete a blob and print its descriptor:

```bash
oras blob delete --descriptor --yes localhost:5000/hello@sha256:9a201d228ebd966211f7d1131be19f152be428bd373a92071c71d8deaf83b3e5
```
oras blob delete --descriptor --force localhost:5000/hello@sha256:9a201d228ebd966211f7d1131be19f152be428bd373a92071c71d8deaf83b3e5
```

## Options

Expand All @@ -50,4 +50,3 @@ oras blob delete --descriptor --yes localhost:5000/hello@sha256:9a201d228ebd9662
-u, --username string registry username
-v, --verbose verbose output
```

10 changes: 1 addition & 9 deletions docs/commands/oras_blob_fetch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 30

# oras blob fetch

Fetch a blob from a remote registry.
Fetch a blob from a registry or an OCI image layout

```bash
oras blob fetch [flags] {--output <file> | --descriptor} <name>@<digest>
Expand Down Expand Up @@ -49,14 +49,6 @@ Fetch and print a blob from OCI image layout archive file 'layout.tar':
oras blob fetch --oci-layout --output - layout.tar@sha256:9a201d228ebd966211f7d1131be19f152be428bd373a92071c71d8deaf83b3e5
```

Fetch a blob with a specific reference, determine its size using `jq`, and use `pv` to display the progress while redirecting the output to a file named `layer.bin`:

```bash
$blob_ref=ghcr.io/oras-project/oras@sha256:74529e03eae02d1fff5c05e9a6ec2089e1f5ae96421169c29a7c165346e042e4
$size=$(oras blob fetch --descriptor $blob_ref | jq -r .size)
$oras blob fetch $blob_ref --output - | pv -s $size > layer.bin
```

## Options

```
Expand Down
14 changes: 7 additions & 7 deletions docs/commands/oras_blob_push.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ sidebar_position: 40

# oras blob push

Push a blob to a remote registry.
Push a blob to a registry or an OCI image layout

```bash
oras blob push [flags] <name>[@digest] <file>
```

## Examples

Push blob "hi.txt":
Push blob 'hi.txt' to a registry:

```bash
oras blob push localhost:5000/hello hi.txt
```

Push blob "hi.txt" with the specific digest:
Push blob 'hi.txt' with the specific digest:

```bash
oras blob push localhost:5000/hello@sha256:9a201d228ebd966211f7d1131be19f152be428bd373a92071c71d8deaf83b3e5 hi.txt
Expand All @@ -31,19 +31,19 @@ Push blob from stdin with blob size and digest:
oras blob push --size 12 localhost:5000/hello@sha256:9a201d228ebd966211f7d1131be19f152be428bd373a92071c71d8deaf83b3e5 -
```

Push blob "hi.txt" and output the descriptor:
Push blob 'hi.txt' and output the descriptor:

```bash
oras blob push --descriptor localhost:5000/hello hi.txt
```

Push blob "hi.txt" with the specific returned media type in the descriptor:
Push blob 'hi.txt' with the specific returned media type in the descriptor:

```bash
oras blob push --media-type application/vnd.oci.image.config.v1+json --descriptor localhost:5000/hello hi.txt
```

Push blob "hi.txt" and output the prettified descriptor:
Push blob 'hi.txt' and output the prettified descriptor:

```bash
oras blob push --descriptor --pretty localhost:5000/hello hi.txt
Expand All @@ -55,7 +55,7 @@ Push blob without TLS:
oras blob push --insecure localhost:5000/hello hi.txt
```

Push blob 'hi.txt' into an OCI layout folder 'layout-dir':
Push blob 'hi.txt' into an OCI image layout folder 'layout-dir':

```bash
oras blob push --oci-layout layout-dir hi.txt
Expand Down
14 changes: 7 additions & 7 deletions docs/commands/oras_manifest_delete.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: oras manifest delete
sidebar_position: 90
sidebar_position: 140
---

# oras manifest delete

Delete a manifest from remote registry.
Delete a manifest from remote registry

```bash
oras manifest delete [flags] <name>{:<tag>|@<digest>}
Expand All @@ -16,25 +16,25 @@ oras manifest delete [flags] <name>{:<tag>|@<digest>}
Delete a manifest tagged with 'v1' from repository 'localhost:5000/hello':

```bash
oras manifest delete localhost:5000/hello:v1
oras manifest delete localhost:5000/hello:v1
```

Delete a manifest without prompting confirmation:

```bash
oras manifest delete --force localhost:5000/hello:v1
oras manifest delete --force localhost:5000/hello:v1
```

Delete a manifest and print its descriptor:

```bash
oras manifest delete --descriptor localhost:5000/hello:v1
oras manifest delete --descriptor localhost:5000/hello:v1
```

Delete a manifest by digest 'sha256:99e4703fbf30916f549cd6bfa9cdbab614b5392fbe64fdee971359a77073cdf9' from repository 'localhost:5000/hello':

```bash
oras manifest delete localhost:5000/hello@sha:99e4703fbf30916f549cd6bfa9cdbab614b5392fbe64fdee971359a77073cdf9
oras manifest delete localhost:5000/hello@sha:99e4703fbf30916f549cd6bfa9cdbab614b5392fbe64fdee971359a77073cdf9
```

## Options
Expand All @@ -56,4 +56,4 @@ Delete a manifest by digest 'sha256:99e4703fbf30916f549cd6bfa9cdbab614b5392fbe64
--resolve host:port:address[:address_port] customized DNS for registry, formatted in host:port:address[:address_port]
-u, --username string registry username
-v, --verbose verbose output
```
```
12 changes: 5 additions & 7 deletions docs/commands/oras_manifest_fetch-config.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: oras manifest fetch-config
sidebar_position: 100
sidebar_position: 160
---

# oras manifest fetch-config

Fetch the config of a manifest from a remote registry.
Fetch the config of a manifest from a registry or an OCI image layout

```bash
oras manifest fetch-config [flags] <name>{:<tag>|@<digest>}
Expand Down Expand Up @@ -49,19 +49,17 @@ Fetch and print the prettified descriptor of the config:
oras manifest fetch-config --descriptor --pretty localhost:5000/hello:v1
```


## Options

```
--ca-file string server certificate authority file for the remote registry
-d, --debug debug mode
--descriptor output the descriptor
-H, --header stringArray add custom headers to requests
-h, --help help for fetch
-h, --help help for fetch-config
--insecure allow connections to SSL registry without certs
--media-type strings accepted media types
--oci-layout set target as an OCI image layout
-o, --output path file path to write the fetched manifest to, use - for stdout
-o, --output path file path to write the fetched config to, use - for stdout
-p, --password string registry password or identity token
--password-stdin read password or identity token from stdin
--plain-http allow insecure connections to registry without SSL check
Expand All @@ -71,4 +69,4 @@ oras manifest fetch-config --descriptor --pretty localhost:5000/hello:v1
--resolve host:port:address[:address_port] customized DNS for registry, formatted in host:port:address[:address_port]
-u, --username string registry username
-v, --verbose verbose output
```
```
15 changes: 8 additions & 7 deletions docs/commands/oras_manifest_fetch.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: oras manifest fetch
sidebar_position: 110
sidebar_position: 150
---

# oras manifest fetch

Fetch manifest of the target artifact.
Fetch manifest of the target artifact

```bash
oras manifest fetch [flags] <name>{:<tag>|@<digest>}
Expand Down Expand Up @@ -43,7 +43,7 @@ Fetch manifest from a registry with prettified json result:
oras manifest fetch --pretty localhost:5000/hello:v1
```

Fetch raw manifest from an OCI layout folder 'layout-dir':
Fetch raw manifest from an OCI image layout folder 'layout-dir':

```bash
oras manifest fetch --oci-layout layout-dir:v1
Expand All @@ -61,18 +61,19 @@ oras manifest fetch --oci-layout layout.tar:v1
--ca-file string server certificate authority file for the remote registry
-d, --debug debug mode
--descriptor output the descriptor
-H, --header stringArray add custom headers to requests
-h, --help help for fetch
--insecure allow connections to SSL registry without certs
--media-type strings accepted media types
--oci-layout set target as an OCI image layout.
--oci-layout set target as an OCI image layout
-o, --output path file path to write the fetched manifest to, use - for stdout
-p, --password string registry password or identity token
--password-stdin read password or identity token 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]
--pretty prettify JSON objects printed to stdout
--registry-config path path of the authentication file
--resolve host:port:address customized DNS formatted in host:port:address
--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]
-u, --username string registry username
-v, --verbose verbose output
```
```
8 changes: 4 additions & 4 deletions docs/commands/oras_manifest_push.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: oras manifest push
sidebar_position: 120
sidebar_position: 170
---

# oras manifest push

Push a manifest to remote registry.
Push a manifest to a registry or an OCI image layout

```bash
oras manifest push [flags] <name>[:<tag>[,<tag>][...]|@<digest>] <file>
Expand Down Expand Up @@ -62,7 +62,7 @@ Push a manifest to repository 'localhost:5000/hello' and tag with 'tag1', 'tag2'
oras manifest push --concurrency 6 localhost:5000/hello:tag1,tag2,tag3 manifest.json
```

Push a manifest to an OCI layout folder 'layout-dir' and tag with 'v1':
Push a manifest to an OCI image layout folder 'layout-dir' and tag with 'v1':

```bash
oras manifest push --oci-layout layout-dir:v1 manifest.json
Expand All @@ -89,4 +89,4 @@ oras manifest push --oci-layout layout-dir:v1 manifest.json
--resolve host:port:address[:address_port] customized DNS for registry, formatted in host:port:address[:address_port]
-u, --username string registry username
-v, --verbose verbose output
```
```
14 changes: 7 additions & 7 deletions docs/commands/oras_repo_ls.mdx
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
---
title: oras repo ls
sidebar_position: 150
sidebar_position: 200
---

# oras repo ls

List the repositories under the registry.
List the repositories under the registry

```bash
oras repo ls [flags] <registry>
```

## Examples

Example - List the repositories under the registry:
List the repositories under the registry:

```bash
oras repo ls localhost:5000
```

Example - List the repositories under a namespace in the registry:
List the repositories under a namespace in the registry:

```bash
oras repo ls localhost:5000/example-namespace
```

Example - List the repositories under the registry that include values lexically after last:
List the repositories under the registry that include values lexically after last:

```bash
oras repo ls --last "last_repo" localhost:5000
```

## Options

```bash
```
--ca-file string server certificate authority file for the remote registry
-d, --debug debug mode
-H, --header stringArray add custom headers to requests
Expand All @@ -47,4 +47,4 @@ oras repo ls --last "last_repo" localhost:5000
--resolve host:port:address[:address_port] customized DNS for registry, formatted in host:port:address[:address_port]
-u, --username string registry username
-v, --verbose verbose output
```
```
12 changes: 6 additions & 6 deletions docs/commands/oras_repo_tags.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: oras repo tags
sidebar_position: 160
sidebar_position: 210
---

# oras repo tags

Show tags of the target repository.
Show tags of the target repository

```bash
oras repo tags [flags] <name>
Expand All @@ -31,7 +31,7 @@ Show tags of the target repository that include values lexically after last:
oras repo tags --last "last_tag" localhost:5000/hello
```

Show tags of the target OCI layout folder 'layout-dir':
Show tags of the target OCI image layout folder 'layout-dir':

```bash
oras repo tags --oci-layout layout-dir
Expand All @@ -43,13 +43,13 @@ Show tags of the target OCI layout archive 'layout.tar':
oras repo tags --oci-layout layout.tar
```

Show tags associated with a particular tagged resource:
[Experimental] Show tags associated with a particular tagged resource:

```bash
oras repo tags localhost:5000/hello:latest
```

Show tags associated with a digest:
[Experimental] Show tags associated with a digest:

```bash
oras repo tags localhost:5000/hello@sha256:c551125a624189cece9135981621f3f3144564ddabe14b523507bf74c2281d9b
Expand All @@ -73,4 +73,4 @@ oras repo tags localhost:5000/hello@sha256:c551125a624189cece9135981621f3f314456
--resolve host:port:address[:address_port] customized DNS for registry, formatted in host:port:address[:address_port]
-u, --username string registry username
-v, --verbose verbose output
```
```

0 comments on commit d1bb93f

Please sign in to comment.