示例#1
0
func (p *ProjectFactory) Create(c *cli.Context) (*project.Project, error) {
	context := &docker.Context{}
	context.LoggerFactory = logger.NewColorLoggerFactory()
	Populate(context, c)
	command.Populate(&context.Context, c)

	return docker.NewProject(context)
}
示例#2
0
func (p *ProjectFactory) Create(c *cli.Context) (*project.Project, error) {
	context := &rancher.Context{
		RancherComposeFile: c.GlobalString("rancher-file"),
		Url:                c.GlobalString("url"),
		AccessKey:          c.GlobalString("access-key"),
		SecretKey:          c.GlobalString("secret-key"),
	}
	command.Populate(&context.Context, c)

	return rancher.NewProject(context)
}