mirror of
https://github.com/rancher/os.git
synced 2025-07-31 22:47: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",
|
||||
"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,
|
||||
},
|
||||
|
69
Godeps/_workspace/src/github.com/rancherio/rancher-compose/librcompose/project/types.go
generated
vendored
69
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 {
|
||||
@ -124,38 +126,37 @@ func NewSliceorMap(parts map[string]string) *SliceorMap {
|
||||
}
|
||||
|
||||
type ServiceConfig struct {
|
||||
CapAdd []string `yaml:"cap_add,omitempty"`
|
||||
CapDrop []string `yaml:"cap_drop,omitempty"`
|
||||
CpuShares int64 `yaml:"cpu_shares,omitempty"`
|
||||
Command string `yaml:"command,omitempty"`
|
||||
Detach string `yaml:"detach,omitempty"`
|
||||
Dns *Stringorslice
|
||||
DnsSearch string `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
|
||||
Links []string `yaml:"links,omitempty"`
|
||||
LogDriver string `yaml:"log_driver,omitempty"`
|
||||
MemLimit int64 `yaml:"mem_limit,omitempty"`
|
||||
Name string `yaml:"name,omitempty"`
|
||||
Net string `yaml:"net,omitempty"`
|
||||
Pid string `yaml:"pid,omitempty"`
|
||||
Ipc string `yaml:"ipc,omitempty"`
|
||||
Ports []string `yaml:"ports,omitempty"`
|
||||
Privileged bool `yaml:"privileged,omitempty"`
|
||||
Restart string `yaml:"restart,omitempty"`
|
||||
ReadOnly bool `yaml:"read_only,omitempty"`
|
||||
StdinOpen bool `yaml:"stdin_open,omitempty"`
|
||||
Tty bool `yaml:"tty,omitempty"`
|
||||
User string `yaml:"user,omitempty"`
|
||||
Volumes []string `yaml:"volumes,omitempty"`
|
||||
VolumesFrom []string `yaml:"volumes_from,omitempty"`
|
||||
WorkingDir string `yaml:"working_dir,omitempty"`
|
||||
CapAdd []string `yaml:"cap_add,omitempty"`
|
||||
CapDrop []string `yaml:"cap_drop,omitempty"`
|
||||
CpuShares int64 `yaml:"cpu_shares,omitempty"`
|
||||
Command string `yaml:"command,omitempty"`
|
||||
Detach string `yaml:"detach,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 *SliceorMap `yaml:"labels,omitempty"`
|
||||
Links []string `yaml:"links,omitempty"`
|
||||
LogDriver string `yaml:"log_driver,omitempty"`
|
||||
MemLimit int64 `yaml:"mem_limit,omitempty"`
|
||||
Name string `yaml:"name,omitempty"`
|
||||
Net string `yaml:"net,omitempty"`
|
||||
Pid string `yaml:"pid,omitempty"`
|
||||
Ipc string `yaml:"ipc,omitempty"`
|
||||
Ports []string `yaml:"ports,omitempty"`
|
||||
Privileged bool `yaml:"privileged,omitempty"`
|
||||
Restart string `yaml:"restart,omitempty"`
|
||||
ReadOnly bool `yaml:"read_only,omitempty"`
|
||||
StdinOpen bool `yaml:"stdin_open,omitempty"`
|
||||
Tty bool `yaml:"tty,omitempty"`
|
||||
User string `yaml:"user,omitempty"`
|
||||
Volumes []string `yaml:"volumes,omitempty"`
|
||||
VolumesFrom []string `yaml:"volumes_from,omitempty"`
|
||||
WorkingDir string `yaml:"working_dir,omitempty"`
|
||||
//`yaml:"build,omitempty"`
|
||||
Expose []string `yaml:"expose,omitempty"`
|
||||
ExternalLinks []string `yaml:"external_links,omitempty"`
|
||||
|
Loading…
Reference in New Issue
Block a user