func (s *Container) Kill() error {
	err := exec.Command(s.docker.binCmd, "kill", s.id).Run()
	if err != nil {
		return err
	}

	stopped := raiqub.WaitFunc(
		250*time.Millisecond, 30*time.Second, func() bool {
			inspect, err := s.Inspect()
			if err != nil || len(inspect) == 0 {
				return true
			}
			if !inspect[0].State.Running {
				return true
			}

			return false
		})
	if !stopped {
		err = fmt.Errorf("Timeout waiting '%s' container to stop", s.id)
	}

	return err
}
func (s *Container) Kill() error {
	err := exec.Command(s.docker.binCmd, "kill", s.id).Run()
	if err != nil {
		return err
	}

	stopped := raiqub.WaitFunc(
		250*time.Millisecond, 30*time.Second, func() bool {
			inspect, err := s.Inspect()
			if err != nil || len(inspect) == 0 {
				return true
			}
			if !inspect[0].State.Running {
				return true
			}

			return false
		})
	if !stopped {
		err = fmt.Errorf("Timeout waiting '%s' container to stop", s.id)
	}

	return err
}
func ( s * Container ) Kill ( ) error { err := exec . Command ( s . docker . binCmd , " " , s . id ) . Run ( ) if err != nil { return err } stopped := raiqub . WaitFunc ( 250 * time . Millisecond , 30 * time . Second , func ( ) bool { inspect , err := s . Inspect ( ) if err != nil || len ( inspect ) == 0 { return true } if ! inspect [ 0 ] . State . Running { return true } return false } ) if ! stopped { err = fmt . Errorf ( " " , s . id ) } return err }
// Kill terminates current container process.
Kill terminates current container process .