'Execute command in existing Docker container
:param cmd_input: input to pass to command in STDIN
:type cmd_input: str
:param combine_output: combine STDERR into STDOUT'

def run(self):

    log.info("Running    in    container    %s:    '%s'    [%s]", self.build_env.container_id, self.get_command(), self.cwd)
    self.start_time = datetime.utcnow()
    client = self.build_env.get_client()
    try:
        exec_cmd = client.exec_create(container=self.build_env.container_id, cmd=self.get_wrapped_command(), stdout=True, stderr=True)
        output = client.exec_start(exec_id=exec_cmd['Id'], stream=False)
        try:
            self.output = output.decode('utf-8', 'replace')
        except (TypeError, AttributeError):
            self.output = ''
        cmd_ret = client.exec_inspect(exec_id=exec_cmd['Id'])
        self.exit_code = cmd_ret['ExitCode']
        if ((self.exit_code == DOCKER_OOM_EXIT_CODE) and (self.output == 'Killed\n')):
            self.output = _('Command    killed    due    to    excessive    memory    consumption\n')
    except DockerAPIError:
        self.exit_code = (-1)
        if ((self.output is None) or (not self.output)):
            self.output = _('Command    exited    abnormally')
    finally:
        self.end_time = datetime.utcnow()
