func (s *Docker) Run(cmd string, args ...string) (string, error) {
	cmdArgs := make([]string, 0, len(args)+1)
	cmdArgs = append(cmdArgs, cmd)
	cmdArgs = append(cmdArgs, args...)

	exe := exec.Command(s.binCmd, cmdArgs...)
	var stdout, stderr bytes.Buffer
	exe.Stdout, exe.Stderr = &stdout, &stderr

	if err := exe.Run(); err != nil {
		return stdout.String(), ExternalCmdError{
			err, stderr.String(), stdout.String()}
	}
	return stdout.String(), nil
}
func (s *Docker) Run(cmd string, args ...string) (string, error) {
	cmdArgs := make([]string, 0, len(args)+1)
	cmdArgs = append(cmdArgs, cmd)
	cmdArgs = append(cmdArgs, args...)

	exe := exec.Command(s.binCmd, cmdArgs...)
	var stdout, stderr bytes.Buffer
	exe.Stdout, exe.Stderr = &stdout, &stderr

	if err := exe.Run(); err != nil {
		return stdout.String(), ExternalCmdError{
			err, stderr.String(), stdout.String()}
	}
	return stdout.String(), nil
}
func ( s * Docker ) Run ( cmd string , args ... string ) ( string , error ) { cmdArgs := make ( [ ] string , 0 , len ( args ) + 1 ) cmdArgs = append ( cmdArgs , cmd ) cmdArgs = append ( cmdArgs , args ... ) exe := exec . Command ( s . binCmd , cmdArgs ... ) var stdout , stderr bytes . Buffer exe . Stdout , exe . Stderr = & stdout , & stderr if err := exe . Run ( ) ; err != nil { return stdout . String ( ) , ExternalCmdError { err , stderr . String ( ) , stdout . String ( ) } } return stdout . String ( ) , nil }
// Run executes especified command on Docker.
//
// Returns ExternalCmdError on error.
Run executes especified command on Docker . Returns ExternalCmdError on error .