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

Function envFileLayers

pkg/compose/publish.go:639–651  ·  view source on GitHub ↗
(files map[string]string)

Source from the content-addressed store, hash-verified

637}
638
639func envFileLayers(files map[string]string) []v1.Descriptor {
640 var layers []v1.Descriptor
641 for file, hash := range files {
642 f, err := os.ReadFile(file)
643 if err != nil {
644 // if we can't read the file, skip to the next one
645 continue
646 }
647 layerDescriptor := oci.DescriptorForEnvFile(hash, f)
648 layers = append(layers, layerDescriptor)
649 }
650 return layers
651}
652
653func (s *composeService) checkOnlyBuildSection(project *types.Project) (bool, error) {
654 errorList := []string{}

Callers 1

createLayersMethod · 0.85

Calls 2

DescriptorForEnvFileFunction · 0.92
ReadFileMethod · 0.80

Tested by

no test coverage detected