Skip to content

Commit 437c9a1

Browse files
committed
incorporate PR feedback
Signed-off-by: Steve Lasker <[email protected]>
1 parent 21e02c1 commit 437c9a1

File tree

2 files changed

+125
-85
lines changed

2 files changed

+125
-85
lines changed

articles/container-registry/container-registry-oci-artifacts.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: stevelas
1212

1313
You can use an [Azure container registry][acr-landing] to store and manage [Open Container Initiative (OCI) artifacts](container-registry-image-formats.md#oci-artifacts) as well as Docker and OCI container images.
1414

15-
To demonstrate this capability, this article shows how to use the [OCI Registry as Storage (ORAS)](https://github.com/deislabs/oras) CLI to push a sample artifact - a text file - to an Azure container registry. Then, pull the artifact from the registry. You can manage various OCI artifacts in an Azure container registry using different command-line tools appropriate to each artifact.
15+
To demonstrate this capability, this article shows how to use the [OCI Registry as Storage (ORAS)][oras-cli] CLI to push a sample artifact - a text file - to an Azure container registry. Then, pull the artifact from the registry. You can manage various OCI artifacts in an Azure container registry using different command-line tools appropriate to each artifact.
1616

1717
## Prerequisites
1818

@@ -70,9 +70,7 @@ echo 'Readme Content' > readme.md
7070
The following step pushes the `readme.md` file to `<myregistry>.azurecr.io/samples/artifact:readme`.
7171
- The registry is identified with the fully qualified registry name `<myregistry>.azurecr.io` (all lowercase), followed by the namespace and repo: `/samples/artifact`.
7272
- The artifact is tagged `:readme`, to identify it uniquely from other artifacts listed in the repo (`:latest, :v1, :v1.0.1`).
73-
- The root artifact, an artifact that doesn't reference another, sets the type through the `-config` parameter.
74-
- `/dev/null` represents an empty config object, where the value `:readme/example` identifies the artifact type.
75-
- `:readme/example` differentiates it from a container image, which uses `application/vnd.oci.image.config.v1+json`.
73+
- Setting `--artifact-type readme/example` differentiates the artifact from a container image, which uses `application/vnd.oci.image.config.v1+json`.
7674
- The `./readme.md` identifies the file uploaded, and the `:application/markdown` represents the [IANA `mediaType`][iana-mediatypes] of the file.
7775
For more information, see [OCI Artifact Authors Guidance](https://github.com/opencontainers/artifacts/blob/main/artifact-authors.md).
7876

@@ -82,15 +80,15 @@ Use the `oras push` command to push the file to your registry.
8280

8381
```bash
8482
oras push $REGISTRY/samples/artifact:readme \
85-
--config /dev/null:readme/example\
83+
--artifact-type readme/example \
8684
./readme.md:application/markdown
8785
```
8886

8987
**Windows**
9088

9189
```cmd
9290
.\oras.exe push $REGISTRY/samples/artifact:readme ^
93-
--config NUL:readme/example ^
91+
--artifact-type readme/example ^
9492
.\readme.md:application/markdown
9593
```
9694

@@ -117,13 +115,13 @@ echo 'Detailed Content' > details/readme-details.md
117115
echo 'More detailed Content' > details/readme-more-details.md
118116
```
119117

120-
Attach the multi-file artifact as a reference.
118+
Push the multi-file artifact:
121119

122120
**Linux, WSL2 or macOS**
123121

124122
```bash
125123
oras push $REGISTRY/samples/artifact:readme \
126-
--config /dev/null:readme/example\
124+
--artifact-type readme/example\
127125
./readme.md:application/markdown\
128126
./details
129127
```
@@ -132,7 +130,7 @@ oras push $REGISTRY/samples/artifact:readme \
132130

133131
```cmd
134132
.\oras.exe push $REGISTRY/samples/artifact:readme ^
135-
--config NUL:readme/example ^
133+
--artifact-type readme/example ^
136134
.\readme.md:application/markdown ^
137135
.\details
138136
```
@@ -149,14 +147,9 @@ The output will be similar to:
149147

150148
```json
151149
{
152-
"schemaVersion": 2,
153-
"mediaType": "application/vnd.oci.image.manifest.v1+json",
154-
"config": {
155-
"mediaType": "readme/example",
156-
"digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
157-
"size": 0
158-
},
159-
"layers": [
150+
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
151+
"artifactType": "readme/example",
152+
"blobs": [
160153
{
161154
"mediaType": "application/markdown",
162155
"digest": "sha256:2fdeac43552b71eb9db534137714c7bad86b53a93c56ca96d4850c9b41b777fc",
@@ -167,17 +160,17 @@ The output will be similar to:
167160
},
168161
{
169162
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
170-
"digest": "sha256:089111d738bd4b883c88ab9bdd7b8d5eba18e9a448d6d8f428b94de140f4f492",
171-
"size": 191,
163+
"digest": "sha256:0d6c7434a34f6854f971487621426332e6c0fda08040b9e6cc8a93f354cee0b1",
164+
"size": 189,
172165
"annotations": {
173-
"io.deis.oras.content.digest": "sha256:1dd2737c1078e36bbd8128712dbf2b0d41ef1abefb954bb5219c5e1096ac8b6a",
166+
"io.deis.oras.content.digest": "sha256:11eceb2e7ac3183ec9109003a7389468ec73ad5ceaec0c4edad0c1b664c5593a",
174167
"io.deis.oras.content.unpack": "true",
175168
"org.opencontainers.image.title": "details"
176169
}
177170
}
178171
],
179172
"annotations": {
180-
"org.opencontainers.image.created": "2023-01-06T20:07:15Z"
173+
"org.opencontainers.artifact.created": "2023-01-10T14:44:06Z"
181174
}
182175
}
183176
```
@@ -219,7 +212,9 @@ To remove the artifact from your registry, use the `oras manifest delete` comman
219212
<!-- LINKS - external -->
220213
[iana-mediatypes]: https://www.rfc-editor.org/rfc/rfc6838
221214
[oras-install-docs]: https://oras.land/cli/
215+
[oras-cli]: https://oras.land/cli_reference/
222216
[oras-push-multifiles]: https://oras.land/cli/1_pushing/#pushing-artifacts-with-multiple-files
217+
223218
<!-- LINKS - internal -->
224219
[acr-landing]: https://aka.ms/acr
225220
[acr-authentication]: /azure/container-registry/container-registry-authentication?tabs=azure-cli

0 commit comments

Comments
 (0)