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

feature: update docs for v1.3.0 #406

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
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
14 changes: 0 additions & 14 deletions versioned_docs/version-1.1/client_libraries/rust.mdx

This file was deleted.

84 changes: 0 additions & 84 deletions versioned_docs/version-1.1/commands/oras_attach.mdx

This file was deleted.

125 changes: 0 additions & 125 deletions versioned_docs/version-1.1/commands/oras_push.mdx

This file was deleted.

14 changes: 14 additions & 0 deletions versioned_docs/version-1.3/client_libraries/rust.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Rust
sidebar_position: 3
---

# Rust

### Crate

- [crates.io/crates/oci-client](https://crates.io/crates/oci-client)

### Repository

- [github.com/oras-project/rust-oci-client](https://github.com/oras-project/rust-oci-client)
119 changes: 119 additions & 0 deletions versioned_docs/version-1.3/commands/oras_attach.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
title: oras attach
sidebar_position: 10
warning: Do NOT modify this generated file
---

# oras attach

[Preview] Attach files to an existing artifact
** This command is in preview and under development. **

```bash
oras attach [flags] --artifact-type=<type> <name>{:<tag>|@<digest>} {<file>[:<layer_media_type>]|--annotation <key>=<value>} [...]
```

## Examples

Attach file 'hi.txt' with artifact type 'doc/example' to manifest 'hello:v1' in registry 'localhost:5000':

```bash
oras attach --artifact-type doc/example localhost:5000/hello:v1 hi.txt
```

Attach file 'hi.txt' to a specific artifact with platform 'linux/amd64' in multi-arch index 'hello:v1'

```bash
oras attach --artifact-type doc/example --platform linux/amd64 localhost:5000/hello:v1 hi.txt
```

Push file "hi.txt" with the custom layer media type 'application/vnd.me.hi':

```bash
oras attach --artifact-type doc/example localhost:5000/hello:v1 hi.txt:application/vnd.me.hi
```

Attach file "hi.txt" using a specific method for the Referrers API:

```bash
oras attach --artifact-type doc/example --distribution-spec v1.1-referrers-api localhost:5000/hello:v1 hi.txt # via API
oras attach --artifact-type doc/example --distribution-spec v1.1-referrers-tag localhost:5000/hello:v1 hi.txt # via tag scheme
```

Attach file 'hi.txt' and add annotations from file 'annotation.json':

```bash
oras attach --artifact-type doc/example --annotation-file annotation.json localhost:5000/hello:v1 hi.txt
```

Attach an artifact with manifest annotations:

```bash
oras attach --artifact-type doc/example --annotation "key1=val1" --annotation "key2=val2" localhost:5000/hello:v1
```

Attach file 'hi.txt' and add manifest annotations:

```bash
oras attach --artifact-type doc/example --annotation "key=val" localhost:5000/hello:v1 hi.txt
```

Attach file 'hi.txt' and format output in JSON:

```bash
oras attach --artifact-type doc/example localhost:5000/hello:v1 hi.txt --format json
```

Attach file 'hi.txt' and format output with Go template:

```bash
oras attach --artifact-type doc/example localhost:5000/hello:v1 hi.txt --format go-template --template "{{.digest}}"
```

Attach file 'hi.txt' and export the pushed manifest to 'manifest.json':

```bash
oras attach --artifact-type doc/example --export-manifest manifest.json localhost:5000/hello:v1 hi.txt
```

Attach file to the manifest tagged 'v1' in an OCI image layout folder 'layout-dir':

```bash
oras attach --oci-layout --artifact-type doc/example layout-dir:v1 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)
-d, --debug output debug logs (implies --no-tty)
--disable-path-validation skip path validation
--distribution-spec string [Preview] set OCI distribution spec version and API option for target. Options: v1.1-referrers-tag, v1.1-referrers-api
--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
'text': Print in text format (default "text")
-H, --header stringArray add custom headers to requests
-h, --help help for attach
--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
-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] [Preview] attach to an arch-specific subject 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 verbose output
```
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,20 @@ oras blob delete --descriptor --force localhost:5000/hello@sha256:9a201d228ebd96

```
--ca-file string server certificate authority file for the remote registry
-d, --debug debug mode
--cert-file string client certificate file for the remote registry
-d, --debug output debug logs (implies --no-tty)
--descriptor output the descriptor
-f, --force ignore nonexistent references, never prompt
-H, --header stringArray add custom headers to requests
-h, --help help for delete
--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
-p, --password string registry password or identity token
--password-stdin read password or identity token from stdin
--password-stdin read password from stdin
--plain-http allow insecure connections to registry without SSL check
--pretty prettify JSON objects printed to stdout
--registry-config path path of the authentication file for registry
Expand Down
Loading
Loading