mirror of
https://github.com/rancher/os.git
synced 2025-08-10 11:03:16 +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",
|
"ImportPath": "github.com/rancherio/rancher-compose/librcompose/docker",
|
||||||
"Comment": "0.1.0-18-g14fef17",
|
"Comment": "0.1.0-22-gb05516d",
|
||||||
"Rev": "14fef170029bba5896269a3b592035b70ae3f2dc"
|
"Rev": "b05516d2ddc60579cf34ff89d4214bf3e6421e45"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/rancherio/rancher-compose/librcompose/project",
|
"ImportPath": "github.com/rancherio/rancher-compose/librcompose/project",
|
||||||
"Comment": "0.1.0-18-g14fef17",
|
"Comment": "0.1.0-22-gb05516d",
|
||||||
"Rev": "14fef170029bba5896269a3b592035b70ae3f2dc"
|
"Rev": "b05516d2ddc60579cf34ff89d4214bf3e6421e45"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/ryanuber/go-glob",
|
"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)
|
cmd, _ := shlex.Split(c.Command)
|
||||||
entrypoint, _ := shlex.Split(c.Entrypoint)
|
entrypoint, _ := shlex.Split(c.Entrypoint)
|
||||||
ports, binding, err := nat.ParsePortSpecs(c.Ports)
|
ports, binding, err := nat.ParsePortSpecs(c.Ports)
|
||||||
restart, err := runconfig.ParseRestartPolicy(c.Restart)
|
|
||||||
dns := c.Dns.Slice()
|
|
||||||
labels := c.Labels.MapParts()
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
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{
|
config := &runconfig.Config{
|
||||||
Entrypoint: runconfig.NewEntrypoint(entrypoint...),
|
Entrypoint: runconfig.NewEntrypoint(entrypoint...),
|
||||||
@ -49,6 +60,7 @@ func Convert(c *project.ServiceConfig) (*runconfig.Config, *runconfig.HostConfig
|
|||||||
Privileged: c.Privileged,
|
Privileged: c.Privileged,
|
||||||
Binds: c.Volumes,
|
Binds: c.Volumes,
|
||||||
Dns: dns,
|
Dns: dns,
|
||||||
|
DnsSearch: dnssearch,
|
||||||
LogConfig: runconfig.LogConfig{
|
LogConfig: runconfig.LogConfig{
|
||||||
Type: c.LogDriver,
|
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 {
|
if s == nil {
|
||||||
return nil, 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 {
|
func (s *Stringorslice) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||||
@ -81,7 +82,8 @@ func (s *SliceorMap) MarshalYAML() (interface{}, error) {
|
|||||||
if s == nil {
|
if s == nil {
|
||||||
return nil, 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 {
|
func (s *SliceorMap) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||||
@ -129,16 +131,15 @@ type ServiceConfig struct {
|
|||||||
CpuShares int64 `yaml:"cpu_shares,omitempty"`
|
CpuShares int64 `yaml:"cpu_shares,omitempty"`
|
||||||
Command string `yaml:"command,omitempty"`
|
Command string `yaml:"command,omitempty"`
|
||||||
Detach string `yaml:"detach,omitempty"`
|
Detach string `yaml:"detach,omitempty"`
|
||||||
Dns *Stringorslice
|
Dns *Stringorslice `yaml:"dns,omitempty"`
|
||||||
DnsSearch string `yaml:"dns_search,omitempty"`
|
DnsSearch *Stringorslice `yaml:"dns_search,omitempty"`
|
||||||
DomainName string `yaml:"domainname,omitempty"`
|
DomainName string `yaml:"domainname,omitempty"`
|
||||||
Entrypoint string `yaml:"entrypoint,omitempty"`
|
Entrypoint string `yaml:"entrypoint,omitempty"`
|
||||||
EnvFile string `yaml:"env_file,omitempty"`
|
EnvFile string `yaml:"env_file,omitempty"`
|
||||||
Environment []string `yaml:"environment,omitempty"`
|
Environment []string `yaml:"environment,omitempty"`
|
||||||
Hostname string `yaml:"hostname,omitempty"`
|
Hostname string `yaml:"hostname,omitempty"`
|
||||||
Image string `yaml:"image,omitempty"`
|
Image string `yaml:"image,omitempty"`
|
||||||
//Labels map[string]string `yaml:"labels,omitempty"`
|
Labels *SliceorMap `yaml:"labels,omitempty"`
|
||||||
Labels *SliceorMap
|
|
||||||
Links []string `yaml:"links,omitempty"`
|
Links []string `yaml:"links,omitempty"`
|
||||||
LogDriver string `yaml:"log_driver,omitempty"`
|
LogDriver string `yaml:"log_driver,omitempty"`
|
||||||
MemLimit int64 `yaml:"mem_limit,omitempty"`
|
MemLimit int64 `yaml:"mem_limit,omitempty"`
|
||||||
|
Loading…
Reference in New Issue
Block a user