2015-05-19 21:37:44 -04:00
|
|
|
// +build experimental
|
|
|
|
|
|
|
|
package runconfig
|
|
|
|
|
|
|
|
import flag "github.com/docker/docker/pkg/mflag"
|
|
|
|
|
|
|
|
type experimentalFlags struct {
|
|
|
|
flags map[string]interface{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func attachExperimentalFlags(cmd *flag.FlagSet) *experimentalFlags {
|
|
|
|
flags := make(map[string]interface{})
|
|
|
|
flags["volume-driver"] = cmd.String([]string{"-volume-driver"}, "", "Optional volume driver for the container")
|
2015-06-15 01:31:09 -04:00
|
|
|
flags["publish-service"] = cmd.String([]string{"-publish-service"}, "", "Publish this container as a service")
|
2015-05-19 21:37:44 -04:00
|
|
|
return &experimentalFlags{flags: flags}
|
|
|
|
}
|
|
|
|
|
|
|
|
func applyExperimentalFlags(exp *experimentalFlags, config *Config, hostConfig *HostConfig) {
|
|
|
|
config.VolumeDriver = *(exp.flags["volume-driver"]).(*string)
|
2015-06-15 01:31:09 -04:00
|
|
|
config.PublishService = *(exp.flags["publish-service"]).(*string)
|
2015-05-19 21:37:44 -04:00
|
|
|
}
|