File: doc.go

package info (click to toggle)
singularity-container 4.1.5%2Bds4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 43,876 kB
  • sloc: asm: 14,840; sh: 3,190; ansic: 1,751; awk: 414; makefile: 413; python: 99
file content (55 lines) | stat: -rw-r--r-- 2,014 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package cacheimport

// Distributable build cache
//
// Main manifest is OCI image index
// https://github.com/opencontainers/image-spec/blob/master/image-index.md .
// Manifests array contains descriptors to the cache layers and one instance of
// build cache config with media type application/vnd.buildkit.cacheconfig.v0 .
// The cache layer descriptors need to have an annotation with uncompressed digest
// to allow deduplication on extraction and optionally "buildkit/createdat"
// annotation to support maintaining original timestamps.
//
// Cache config file layout:
//
//{
//  "layers": [                       <- layers contains references to blobs
//    {
//      "blob": "sha256:deadbeef",    <- digest of layer blob in index
//      "parent": -1                  <- index of parent layer, -1 if no parent
//    },
//    {
//      "blob": "sha256:deadbeef",
//      "parent": 0
//    }
//  ],
//
//  "records": [                       <- records contains chains of cache keys
//    {
//      "digest": "sha256:deadbeef",   <- base digest for the record
//    },
//    {
//      "digest": "sha256:deadbeef",
//      "layers": [                    <- optional array of layer pointers
//        {
//          "createdat": "",
//          "layer": 1,                <- index to the layers array, layer is loaded with all of its parents
//        }
//      ],
//      "chains": [                    <- optional array of layer pointer lists
//        {
//          "createdat": "",
//          "layers": [1],             <- indexes to the layers array, all layers are loaded in specified order without parents
//        }
//      ],
//      "inputs": [                    <- dependant records, this is how cache keys are linked together
//        [                            <- index of the dependency (0)
//          {
//            "selector": "sel",       <- optional selector
//            "link": 0,               <- index to the dependant record
//          }
//        ]
//      ]
//    }
//  ]
// }