func parseV2(path string) (*project.Project, error) {
	context := project.Context{}
	context.ComposeFiles = []string{path}
	context.ResourceLookup = new(lookup.FileResourceLookup)
	someEnvFilePath := ".env"
	if !common.IgnoreEnvironment {
		absSomeEnvFilePath, err := filepath.Abs(someEnvFilePath)
		if err != nil {
			logrus.Errorf("Failed to make the path %s absolute. Error: %q", someEnvFilePath, err)
			return nil, err
		}
		someEnvFilePath = absSomeEnvFilePath
	}
	context.EnvironmentLookup = &lookup.ComposableEnvLookup{
		Lookups: []config.EnvironmentLookup{
			&lookup.EnvfileLookup{Path: someEnvFilePath},
			&lookup.OsEnvLookup{},
		},
	}
	parseOptions := config.ParseOptions{
		Interpolate: true,
		Validate:    true,
		Preprocess:  removeNonExistentEnvFilesV2(path),
	}
	proj := project.NewProject(&context, nil, &parseOptions)
	originalLevel := logrus.GetLevel()
	logrus.SetLevel(logrus.FatalLevel)  
	err := proj.Parse()
	logrus.SetLevel(originalLevel)  
	if err != nil {
		err := fmt.Errorf("failed to load docker compose file at path %s Error: %q", path, err)
		logrus.Debug(err)
		return nil, err
	}
	return proj, nil
}
parseV2 parses version 2 compose files
package compose
import (
	"fmt"
	"os"
	"path/filepath"
	"regexp"
	"strings"
	"time"
	"github.com/docker/libcompose/config"
	"github.com/docker/libcompose/lookup"
	"github.com/docker/libcompose/project"
	"github.com/google/go-cmp/cmp"
	"github.com/konveyor/move2kube/common"
	irtypes "github.com/konveyor/move2kube/types/ir"
	"github.com/pkg/errors"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cast"
	"k8s.io/apimachinery/pkg/api/resource"
	core "k8s.io/kubernetes/pkg/apis/core"
	"k8s.io/kubernetes/pkg/apis/networking"
)
type v1v2Loader struct {
}
type preprocessFunc func(rawServiceMap config.RawServiceMap) (config.RawServiceMap, error)
func removeNonExistentEnvFilesV2(path string) preprocessFunc {
	composeFileDir := filepath.Dir(path)
	return func(rawServiceMap config.RawServiceMap) (config.RawServiceMap, error) {
		for serviceName, vals := range rawServiceMap {
			if envfilesvals, ok := vals[envFile]; ok {
				if envfilesstr, ok := envfilesvals.(string); ok {
					envFilePath := envfilesstr
					if !filepath.IsAbs(envFilePath) {
						envFilePath = filepath.Join(composeFileDir, envFilePath)
					}
					finfo, err := os.Stat(envFilePath)
					if os.IsNotExist(err) || finfo.IsDir() {
						logrus.Warnf("Unable to find env config file %s referred in service %s in file %s. Ignoring it.", envFilePath, serviceName, path)
						delete(vals, envFile)
					}
				} else if envfilesvalsint, ok := envfilesvals.([]interface{}); ok {
					envfiles := []interface{}{}
					for _, envfilesval := range envfilesvalsint {
						if envfilesstr, ok := envfilesval.(string); ok {
							envFilePath := envfilesstr
							if !filepath.IsAbs(envFilePath) {
								envFilePath = filepath.Join(composeFileDir, envFilePath)
							}
							finfo, err := os.Stat(envFilePath)
							if os.IsNotExist(err) || finfo.IsDir() {
								logrus.Warnf("Unable to find env config file %s referred in service %s in file %s. Ignoring it.", envFilePath, serviceName, path)
								continue
							}
							envfiles = append(envfiles, envfilesstr)
						}
					}
					vals[envFile] = envfiles
				}
			}
		}
		return rawServiceMap, nil
	}
}