Skip to content

Instantly share code, notes, and snippets.

@judavi
Created March 19, 2020 16:59
Show Gist options
  • Save judavi/31bf3f416eff17b3caa6fe90bfde0b50 to your computer and use it in GitHub Desktop.
Save judavi/31bf3f416eff17b3caa6fe90bfde0b50 to your computer and use it in GitHub Desktop.
Image Notes and Occurrences in Grafeas Model
{
"name": "/projects/images/notes/rhel7_7.14",
"shortDescription": "Base image note for RHEL 7 7.14",
"longDescription": "",
"kind": "baseImage",
"relatedUrl": [
{
"url": "",
"label": "Artifactory URL",
}
],
"createTime": "2017-06-15T15:28:40.142107Z",
"updateTime": "2017-06-15T15:28:40.142107Z",
"relatedNoteNames": [
"string" //If we want to add more relevant data like team? build system?
],
"baseImage": {
"resourceUrl": "",
"fingerprint": {
"v1Name": "The layer ID of the final layer in the Docker image's v1 representation",
"v2Blob": [
"The ordered list of v2 blobs that represent a given image"
]
}
}
{
"name": "projects/images/occurrences/randomID",
"resourceUrl": {
"uri": "https://myregistry/image@sha256:hash",
},
"noteName": "/projects/images/notes/rhel7_7.14", // All the images derived from rhel 7 7.14
"kind": "IMAGE",
"createTime": "2017-06-15T15:28:40.142107Z",
"derivedImage": {
"fingerprint": {
"resourceUrl": "",
"fingerprint": {
"v1Name": "The layer ID of the final layer in the Docker image's v1 representation",
"v2Blob": [
"The ordered list of v2 blobs that represent a given image"
]
},
"distance": 4, //The number of layers by which this image differs from the associated image basis
"layerInfo": [
{
"directive": enum (Directive), // each of the Dockerfile lines
"arguments": string // we don't really need to duplicate the Dockerfile here
}
],
"baseResourceUrl": "https://myregistry/image@sha256:hash"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment