# 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`
if not has_been_invoked_before:
            
            copy_command = '%s cp "%s/." "%s:/var/task";' % (docker_cmd, lambda_cwd, container_info.name)
        elif os.path.exists(event_file):
            
            copy_command = '%s cp "%s" "%s:/var/task";' % (docker_cmd, event_file, container_info.name)
        cmd = (
            '%s'
            ' %s exec'
            ' %s'  
            ' %s'  
            ' %s'  
        ) % (copy_command, docker_cmd, exec_env_vars, container_info.name, command)
        LOG.debug('Command for docker-reuse Lambda executor: %s' % cmd)
        return cmd
    def startup(self):
        self.cleanup()
        
        self.start_idle_container_destroyer_interval()
    def cleanup(self, arn=None):
        if arn:
            self.function_invoke_times.pop(arn, None)
            return self.destroy_docker_container(arn)
        self.function_invoke_times = {}
        return self.destroy_existing_docker_containers()
    def prime_docker_container(self, runtime, func_arn, env_vars, lambda_cwd):
        """
        Prepares a persistent docker container for a specific function.
        :param runtime: Lamda runtime environment. python2.7, nodejs6.10, etc.
        :param func_arn: The ARN of the lambda function.