You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-registry/container-registry-oci-artifacts.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,12 @@ To demonstrate this capability, this article shows how to use the [OCI Registry
16
16
17
17
## Prerequisites
18
18
19
-
***Azure container registry** - Create a container registry in your Azure subscription. For example, use the [Azure portal](container-registry-get-started-portal.md) or the [Azure CLI](container-registry-get-started-azure-cli.md).
19
+
***Azure container registry** - Create a container registry in your Azure subscription. For example, use the [Azure portal](container-registry-get-started-portal.md) or the [Azure CLI][az-acr-create].
20
20
***Azure CLI** - Version `2.29.1` or later is recommended. Run `az --version `to find the required. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
21
21
***ORAS CLI** - Download and install the ORAS CLI `v0.16.0` for your operating system from the [ORAS installation guide](https://oras.land/cli/).
22
-
***Docker** - ORAS leverages the Docker desktop credential store for authentication. You can use [Docker installed locally][docker-install] to build and push a container image, reference an existing container image or use [ACR Build][az-acr-build] to build remotely, in Azure.
22
+
***Docker** - ORAS optionally leverages the Docker desktop credential store for authentication.
23
+
If Docker Desktop is installed, it must be running.
24
+
You can use [Docker installed locally][docker-install] to build and push a container image, reference an existing container image or use [ACR Build][az-acr-build] to build remotely, in Azure.
When OCI artifacts are pushed to a registry with ORAS, each file reference is pushed as a blob. To push separate blobs, reference the files individually, or collection of files by referencing a directory.
109
111
For more information how to push a collection of files, see [Pushing artifacts with multiple files][oras-push-multifiles]
Copy file name to clipboardExpand all lines: articles/container-registry/container-registry-oras-artifacts.md
+63-24Lines changed: 63 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,16 +15,22 @@ Use an Azure container registry to store and manage a graph of supply chain arti
15
15
16
16

17
17
18
-
To demonstrate this capability, this article shows how to use the [OCI Registry as Storage (ORAS)](https://oras.land) CLI to pushand pull a graph of supply chain artifacts to an Azure container registry.
18
+
To demonstrate this capability, this article shows how to use the [OCI Registry as Storage (ORAS)](https://oras.land) CLI to `push`, `discover`and `pull` a graph of supply chain artifacts to an Azure container registry.
19
19
20
-
Storing individual OCI Artifacts are covered in [Push and pull OCI artifact](container-registry-oci-artifacts.md). To store a graph of artifacts, a reference to a `subject` artifact is defined using the [OCI Artifact Manifest][oci-artifact-manifest], which is part of the [pre-release OCI 1.1 Distribution specification][oci-1_1-spec]. OCI Artifact Manifest support is a preview feature and subject to [limitations](#preview-limitations).
20
+
Storing individual (root) OCI Artifacts are covered in [Push and pull OCI artifact](container-registry-oci-artifacts.md).
21
+
To store a graph of artifacts, a reference to a `subject` artifact is defined using the [OCI Artifact Manifest][oci-artifact-manifest], which is part of the [pre-release OCI 1.1 Distribution specification][oci-1_1-spec].
22
+
OCI 1.1 Artifact Manifest support is a preview feature and subject to [limitations](#preview-limitations).
21
23
22
24
## Prerequisites
23
25
24
-
***Azure container registry** - Create a container registry in your Azure subscription. For example, use the [Azure portal](container-registry-get-started-portal.md) or the [Azure CLI](container-registry-get-started-azure-cli.md).
26
+
***Azure container registry** - Create a container registry in your Azure subscription. For example, use the [Azure portal](container-registry-get-started-portal.md) or the [Azure CLI][az-acr-create].
25
27
***Azure CLI** - Version `2.29.1` or later is recommended. Run `az --version `to find the required. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
26
-
***ORAS CLI** - Download and install the ORAS CLI `v0.16.0` for your operating system from the [ORAS installation guide](https://oras.land/cli/).
27
-
***Docker (optional)** - To complete the walkthrough, a container image is referenced. You can use [Docker installed locally][docker-install] to build and push a container image, reference an existing container image or use [ACR Build][az-acr-build] to build remotely, in Azure.
28
+
***ORAS CLI** - Download and install the ORAS CLI `v0.16.0` for your operating system from the [ORAS installation guide][oras-install-docs].
29
+
***Docker** - ORAS optionally leverages the Docker desktop credential store for authentication.
30
+
If Docker Desktop is installed, it must be running.
31
+
To complete the walkthrough, a container image is referenced.
32
+
You can use [Docker installed locally][docker-install] to build and push a container image, reference an existing container image or use [ACR Build][az-acr-build] to build remotely, in Azure.
33
+
You can use [Docker installed locally][docker-install] to build and push a container image, reference an existing container image or use [ACR Build][az-acr-build] to build remotely, in Azure.
28
34
29
35
## Preview limitations
30
36
@@ -68,7 +74,9 @@ Provide the credentials to `oras login`.
68
74
69
75
## Push a container image
70
76
71
-
This example associates a graph of artifacts to a container image. Build and push a container image, or reference an existing image in the registry.
77
+
This example associates a graph of artifacts to a container image.
78
+
79
+
Build and push a container image, or skip this step if `$IMAGE` references an existing image in the registry.
72
80
73
81
```bash
74
82
az acr build -r $ACR_NAME -t $IMAGE https://github.com/wabbit-networks/net-monitor.git#main
### Attach a signature to the registry, as a reference to the container image
84
92
85
-
The ORAS command attaches the signature to a repository, referencing another artifact. The `--artifact-type` provides for differentiating artifacts, similar to file extensions that enable different file types. One or more files can be attached by specifying `file:mediaType`.
93
+
The `oras attach`command creates a reference between the file (`./signature.json`) to the `$IMAGE`. The `--artifact-type` provides for differentiating artifacts, similar to file extensions that enable different file types. One or more files can be attached by specifying `[file]:[mediaType]`.
86
94
87
95
```bash
88
96
oras attach $IMAGE \
89
-
./signature.json:application/json \
90
-
--artifact-type signature/example
97
+
--artifact-type signature/example \
98
+
./signature.json:application/json
91
99
```
92
100
93
101
For more information on oras attach, see [ORAS documentation][oras-docs].
94
102
95
103
## Attach a multi-file artifact as a reference
96
104
97
-
Create some documentation around an artifact.
105
+
When OCI artifacts are pushed to a registry with ORAS, each file reference is pushed as a blob. To push separate blobs, reference the files individually, or collection of files by referencing a directory.
106
+
For more information how to push a collection of files, see [Pushing artifacts with multiple files][oras-push-multifiles]
Attach the multi-file artifact as a reference to `$IMAGE`:
105
118
106
119
```bash
107
120
oras attach $IMAGE \
121
+
--artifact-type readme/example\
108
122
./readme.md:application/markdown \
109
-
./readme-details.md:application/markdown \
110
-
--artifact-type readme/example
123
+
./details
111
124
```
112
125
113
126
## Discovering artifact references
114
127
115
-
The [OCI v1.1 Specification][oci-spec] defines a [referrers API][oci-artifacts-referrers] for discovering references to a `subject` artifact. The `oras discover` command can show the list of references to the container image.
128
+
The [OCI v1.1 Specification][oci-spec] defines a [referrers API][oci-artifact-referrers] for discovering references to a `subject` artifact. The `oras discover` command can show the list of references to the container image.
116
129
117
130
Using `oras discover`, view the graph of artifacts now stored in the registry.
Support for the OCI v1.1 Specification enables deleting the graph of artifacts associated with the root artifact. Use the [az acr repository delete][az-acr-repository-delete] command to delete the signature, SBoM and the signature of the SBoM.
@@ -291,15 +327,18 @@ Support for the OCI v1.1 Specification enables deleting the graph of artifacts a
291
327
az acr repository delete \
292
328
-n $ACR_NAME \
293
329
-t ${REPO}:$TAG -y
330
+
331
+
az acr repository delete \
332
+
-n $ACR_NAME \
333
+
-t sample-staging/${REPO}:$TAG -y
294
334
```
295
335
296
336
### View the remaining manifests
297
337
298
338
```azurecli
299
339
az acr manifest list-metadata \
300
340
--name $REPO \
301
-
--registry $ACR_NAME \
302
-
--detail -o jsonc
341
+
--registry $ACR_NAME -o jsonc
303
342
```
304
343
305
344
## Next steps
@@ -309,16 +348,16 @@ az acr manifest list-metadata \
0 commit comments