MCPcopy
hub / github.com/docker/compose / DescriptorForComposeFile

Function DescriptorForComposeFile

internal/oci/push.go:71–82  ·  view source on GitHub ↗
(path string, content []byte)

Source from the content-addressed store, hash-verified

69}
70
71func DescriptorForComposeFile(path string, content []byte) v1.Descriptor {
72 return v1.Descriptor{
73 MediaType: ComposeYAMLMediaType,
74 Digest: digest.FromString(string(content)),
75 Size: int64(len(content)),
76 Annotations: map[string]string{
77 "com.docker.compose.version": api.ComposeVersion,
78 "com.docker.compose.file": filepath.Base(path),
79 },
80 Data: content,
81 }
82}
83
84func DescriptorForEnvFile(path string, content []byte) v1.Descriptor {
85 return v1.Descriptor{

Callers 2

createLayersMethod · 0.92
processExtendsFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected