1
0
Fork 0
mirror of https://github.com/imjasonh/datatest synced 2026-07-06 22:12:40 +00:00
No description
Find a file
2021-07-30 15:24:29 -04:00
go.mod initial commit 2021-07-29 09:36:23 -04:00
go.sum initial commit 2021-07-29 09:36:23 -04:00
LICENSE add license 2021-07-30 12:34:10 -04:00
main.go send actual tar contents 2021-07-30 13:36:11 -04:00
README.md Add azure 2021-07-30 14:22:34 -05:00

Testing image-spec data field

https://github.com/opencontainers/image-spec/pull/826

Usage

Push an image containing inline data to a remote registry.

$ crane manifest $(go run ./ -ref=${image}) | jq
$ go run ./ -help
  -oci
    	if true, push as OCI image
  -ref string
    	ref to push to (default "gcr.io/imjasonh/data")
  -size int
    	size of bytes to send (default 10)

Repos tested

  • gcr.io/imjasonh/data
  • quay.io/imjasonh/data
  • docker.io/imjasonh/data
  • ghcr.io/dlorenc/signed-container:foo
  • registry.digitalocean.com/dlorenc/test:foo
  • bundle.bar/u/danlorenc/test:v1
  • dlorenctest2.azurecr.io/test:foo

You can check these manifests yourself:

$ crane manifest docker.io/imjasonh/data | jq
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
  "config": {
    "mediaType": "application/vnd.docker.container.image.v1+json",
    "size": 233,
    "digest": "sha256:5c6252906e515b45399e41fda0307669c92e15d7745ea0d49670fe37c5c1b568"
  },
  "layers": [
    {
      "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
      "size": 5,
      "digest": "sha256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824",
      "data": "aGVsbG8="
    }
  ]
}

If you test this with another repository please send a PR!