github.com/cpuid/libcompose@v0.4.0/cli/docker/app/factory.go (about)

     1  package app
     2  
     3  import (
     4  	"github.com/docker/libcompose/cli/logger"
     5  	"github.com/docker/libcompose/docker"
     6  	"github.com/docker/libcompose/docker/ctx"
     7  	"github.com/docker/libcompose/project"
     8  	"github.com/urfave/cli"
     9  )
    10  
    11  // ProjectFactory is a struct that holds the app.ProjectFactory implementation.
    12  type ProjectFactory struct {
    13  }
    14  
    15  // Create implements ProjectFactory.Create using docker client.
    16  func (p *ProjectFactory) Create(c *cli.Context) (project.APIProject, error) {
    17  	context := &ctx.Context{}
    18  	context.LoggerFactory = logger.NewColorLoggerFactory()
    19  	Populate(context, c)
    20  	return docker.NewProject(context, nil)
    21  }