# Steps to reproduce

* Run `localstack` with `LAMBDA_EXECUTOR=docker` and `LAMBDA_REMOTE_DOCKER=true`.
* Create and execute multiple lambda functions.
* Run `docker ps -a` and observe multiple `lambci` containers

This does not happen with `LAMBDA_EXECUTOR=docker-reuse` or with `LAMBDA_REMOTE_DOCKER=true`
continue
            
            log_time = invocation_time + float(i) * time_diff_per_line
            event = {'timestamp': int(log_time), 'message': line}
            log_events.append(event)
        if not log_events:
            return
        logs_client.put_log_events(
            logGroupName=log_group_name,
            logStreamName=log_stream_name,
            logEvents=log_events
        )
    def run_lambda_executor(self, cmd, event=None, env_vars={}):
        process = run(cmd, asynchronous=True, stderr=subprocess.PIPE, outfile=subprocess.PIPE, env_vars=env_vars,
                      stdin=True)
        result, log_output = process.communicate(input=event)
        result = to_str(result).strip()
        log_output = to_str(log_output).strip()
        return_code = process.returncode
        
        
        
        if '\n' in result:
            additional_logs, _, result = result.rpartition('\n')
            log_output += '\n%s' % additional_logs
        if return_code != 0:
            raise Exception('Lambda process returned error status code: %s. Output:\n%s' %
                (return_code, log_output))
        return result, log_output
class ContainerInfo: