Skip to content

Instantly share code, notes, and snippets.

@developer-guy
Forked from scottrigby/zot-kind-helm-skopeo.md
Created December 6, 2022 09:39
Show Gist options
  • Save developer-guy/2f500cb264241ed4e2ed5264fee6ea0f to your computer and use it in GitHub Desktop.
Save developer-guy/2f500cb264241ed4e2ed5264fee6ea0f to your computer and use it in GitHub Desktop.
Inspect OCI artifact locally (Zot, kind, Helm, and Skopeo)
1. setup
```console
$ kind create cluster
```
1. install zot with minimal image for security-minded dist-spec-only
```console
$ helm upgrade zot zot/zot --set image.repository=ghcr.io/project-zot/zot-minimal-linux-amd64
```
1. port-forward service for ease
```console
$ kubectl port-forward svc/zot 50000:5000
```
1. Test pushing a bare helm chart to zot
```console
$ helm create foo && helm package foo
$ helm push foo-0.1.0.tgz oci://127.0.0.1:50000
```
1. Inspect OCI package with Skopeo
```console
$ skopeo inspect --raw --tls-verify=false docker://127.0.0.1:50000/foo:0.1.0 | jq
{
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.cncf.helm.config.v1+json",
"digest": "sha256:af9c03c64b1d3d1c76a09d75faf3fd1c8b9ccc97ce0d31e464bccf68fe236674",
"size": 137
},
"layers": [
{
"mediaType": "application/vnd.cncf.helm.chart.content.v1.tar+gzip",
"digest": "sha256:dce0001b81ca61d8710bce34361bdfc05748459adf008a101126508fb7e05309",
"size": 3750
}
]
}
```
1. Cleanup
```console
$ kind delete cluster
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment