github.com/bhameyie/otto@v0.2.1-0.20160406174117-16052efa52ec/builtin/app/docker-external/customization.go (about)

     1  package dockerext
     2  
     3  import (
     4  	"github.com/hashicorp/otto/helper/compile"
     5  	"github.com/hashicorp/otto/helper/schema"
     6  )
     7  
     8  type customizations struct {
     9  	Opts *compile.AppOptions
    10  }
    11  
    12  func (c *customizations) process(d *schema.FieldData) error {
    13  	image := d.Get("image").(string)
    14  	if image == "" {
    15  		image = c.Opts.Ctx.Application.Name
    16  	}
    17  
    18  	c.Opts.Bindata.Context["docker_image"] = image
    19  	c.Opts.Bindata.Context["run_args"] = d.Get("run_args").(string)
    20  	return nil
    21  }