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

Function DescriptorForEnvFile

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

Source from the content-addressed store, hash-verified

82}
83
84func DescriptorForEnvFile(path string, content []byte) v1.Descriptor {
85 return v1.Descriptor{
86 MediaType: ComposeEnvFileMediaType,
87 Digest: digest.FromString(string(content)),
88 Size: int64(len(content)),
89 Annotations: map[string]string{
90 "com.docker.compose.version": api.ComposeVersion,
91 "com.docker.compose.envfile": filepath.Base(path),
92 },
93 Data: content,
94 }
95}
96
97func PushManifest(ctx context.Context, resolver remotes.Resolver, named reference.Named, layers []v1.Descriptor, ociVersion api.OCIVersion) (v1.Descriptor, error) {
98 // Check if we need an extra empty layer for the manifest config

Callers 1

envFileLayersFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected