mirror of
https://github.com/rancher/os.git
synced 2025-08-09 10:38:25 +00:00
Godeps rancher-compose bump
This commit is contained in:
parent
4201133193
commit
245a7dd46a
8
Godeps/Godeps.json
generated
8
Godeps/Godeps.json
generated
@ -172,13 +172,13 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/rancherio/rancher-compose/librcompose/docker",
|
||||
"Comment": "0.1.0-18-g14fef17",
|
||||
"Rev": "14fef170029bba5896269a3b592035b70ae3f2dc"
|
||||
"Comment": "0.1.0-22-gb05516d",
|
||||
"Rev": "b05516d2ddc60579cf34ff89d4214bf3e6421e45"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/rancherio/rancher-compose/librcompose/project",
|
||||
"Comment": "0.1.0-18-g14fef17",
|
||||
"Rev": "14fef170029bba5896269a3b592035b70ae3f2dc"
|
||||
"Comment": "0.1.0-22-gb05516d",
|
||||
"Rev": "b05516d2ddc60579cf34ff89d4214bf3e6421e45"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/ryanuber/go-glob",
|
||||
|
20
Godeps/_workspace/src/github.com/rancherio/rancher-compose/librcompose/docker/convert.go
generated
vendored
20
Godeps/_workspace/src/github.com/rancherio/rancher-compose/librcompose/docker/convert.go
generated
vendored
@ -19,13 +19,24 @@ func Convert(c *project.ServiceConfig) (*runconfig.Config, *runconfig.HostConfig
|
||||
cmd, _ := shlex.Split(c.Command)
|
||||
entrypoint, _ := shlex.Split(c.Entrypoint)
|
||||
ports, binding, err := nat.ParsePortSpecs(c.Ports)
|
||||
restart, err := runconfig.ParseRestartPolicy(c.Restart)
|
||||
dns := c.Dns.Slice()
|
||||
labels := c.Labels.MapParts()
|
||||
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
restart, err := runconfig.ParseRestartPolicy(c.Restart)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
dns := c.Dns.Slice()
|
||||
dnssearch := c.DnsSearch.Slice()
|
||||
labels := c.Labels.MapParts()
|
||||
|
||||
if len(c.Expose) > 0 {
|
||||
exposedPorts, _, err := nat.ParsePortSpecs(c.Expose)
|
||||
ports = exposedPorts
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
}
|
||||
|
||||
config := &runconfig.Config{
|
||||
Entrypoint: runconfig.NewEntrypoint(entrypoint...),
|
||||
@ -49,6 +60,7 @@ func Convert(c *project.ServiceConfig) (*runconfig.Config, *runconfig.HostConfig
|
||||
Privileged: c.Privileged,
|
||||
Binds: c.Volumes,
|
||||
Dns: dns,
|
||||
DnsSearch: dnssearch,
|
||||
LogConfig: runconfig.LogConfig{
|
||||
Type: c.LogDriver,
|
||||
},
|
||||
|
13
Godeps/_workspace/src/github.com/rancherio/rancher-compose/librcompose/project/types.go
generated
vendored
13
Godeps/_workspace/src/github.com/rancherio/rancher-compose/librcompose/project/types.go
generated
vendored
@ -34,7 +34,8 @@ func (s *Stringorslice) MarshalYAML() (interface{}, error) {
|
||||
if s == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return yaml.Marshal(s.Slice())
|
||||
bytes, err := yaml.Marshal(s.Slice())
|
||||
return string(bytes), err
|
||||
}
|
||||
|
||||
func (s *Stringorslice) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
@ -81,7 +82,8 @@ func (s *SliceorMap) MarshalYAML() (interface{}, error) {
|
||||
if s == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return yaml.Marshal(s.MapParts())
|
||||
bytes, err := yaml.Marshal(s.MapParts())
|
||||
return string(bytes), err
|
||||
}
|
||||
|
||||
func (s *SliceorMap) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
@ -129,16 +131,15 @@ type ServiceConfig struct {
|
||||
CpuShares int64 `yaml:"cpu_shares,omitempty"`
|
||||
Command string `yaml:"command,omitempty"`
|
||||
Detach string `yaml:"detach,omitempty"`
|
||||
Dns *Stringorslice
|
||||
DnsSearch string `yaml:"dns_search,omitempty"`
|
||||
Dns *Stringorslice `yaml:"dns,omitempty"`
|
||||
DnsSearch *Stringorslice `yaml:"dns_search,omitempty"`
|
||||
DomainName string `yaml:"domainname,omitempty"`
|
||||
Entrypoint string `yaml:"entrypoint,omitempty"`
|
||||
EnvFile string `yaml:"env_file,omitempty"`
|
||||
Environment []string `yaml:"environment,omitempty"`
|
||||
Hostname string `yaml:"hostname,omitempty"`
|
||||
Image string `yaml:"image,omitempty"`
|
||||
//Labels map[string]string `yaml:"labels,omitempty"`
|
||||
Labels *SliceorMap
|
||||
Labels *SliceorMap `yaml:"labels,omitempty"`
|
||||
Links []string `yaml:"links,omitempty"`
|
||||
LogDriver string `yaml:"log_driver,omitempty"`
|
||||
MemLimit int64 `yaml:"mem_limit,omitempty"`
|
||||
|
Loading…
Reference in New Issue
Block a user