Merge pull request #1872 from bradrydzewski/master
fixes issues running services in detached mode
This commit is contained in:
commit
9d80bf3aba
2 changed files with 12 additions and 0 deletions
|
@ -40,6 +40,15 @@ func ImageEscalate(conf *yaml.Config, patterns []string) error {
|
|||
for _, c := range conf.Pipeline {
|
||||
for _, pattern := range patterns {
|
||||
if ok, _ := filepath.Match(pattern, c.Image); ok {
|
||||
if c.Detached {
|
||||
return fmt.Errorf("Detached mode disabled for the %s plugin", c.Image)
|
||||
}
|
||||
if len(c.Entrypoint) != 0 {
|
||||
return fmt.Errorf("Custom entrypoint disabled for the %s plugin", c.Image)
|
||||
}
|
||||
if len(c.Command) != 0 {
|
||||
return fmt.Errorf("Custom command disabled for the %s plugin", c.Image)
|
||||
}
|
||||
if len(c.Commands) != 0 {
|
||||
return fmt.Errorf("Custom commands disabled for the %s plugin", c.Image)
|
||||
}
|
||||
|
|
|
@ -36,6 +36,9 @@ func Check(c *yaml.Config, trusted bool) error {
|
|||
// validate the plugin command and entrypoint and return an error
|
||||
// the user attempts to set or override these values.
|
||||
func CheckEntrypoint(c *yaml.Container) error {
|
||||
if c.Detached {
|
||||
return nil
|
||||
}
|
||||
if len(c.Entrypoint) != 0 {
|
||||
return fmt.Errorf("Cannot set plugin Entrypoint")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue