### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

I'm using localstack in docker-compose to test a lambda function. The lambda is in a docker image and gets triggered when a file is uploaded to s3. 

Here is the localstack docker-compose setup
```yml
localstack:
    image: localstack/localstack:latest
    ports:
      - 4566:4566
    environment:
      SERVICES: s3,sns,lambda,iam
      AWS_DEFAULT_REGION: us-west-2
      LAMBDA_EXECUTOR: docker-reuse
      LAMBDA_REMOVE_CONTAINERS: 0
      LOCALSTACK_API_KEY: ${LOCALSTACK_API_KEY}
    volumes:
     - ./localstack-init-scripts:/docker-entrypoint-initaws.d
     - "/var/run/docker.sock:/var/run/docker.sock"
```

And here is the localstack error that happens when the lambda is triggered.
```bash
localstack_1        | 2021-12-15T20:09:24.960:ERROR:localstack_ext.services.awslambda.lambda_extended: Unable to invoke Lambda "arn:aws:lambda:us-west-2:000000000000:function:kb-service-upload-handler": 
localstack_1        | Traceback (most recent call last):
localstack_1        |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/docker/api/client.py", line 268, in _raise_for_status
localstack_1        |     response.raise_for_status()
localstack_1        |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
localstack_1        |     raise HTTPError(http_error_msg, response=self)
localstack_1        | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http+docker://localhost/v1.41/containers/cea0db10eafcec866aaedb6d45048e060f978d44843dae4e9282a1fb75340837/start
localstack_1        | 
localstack_1        | During handling of the above exception, another exception occurred:
localstack_1        | 
localstack_1        | Traceback (most recent call last):
localstack_1        |   File "/opt/code/localstack/localstack/utils/docker_utils.py", line 1413, in start_container
localstack_1        |     container.start()
localstack_1        |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/docker/models/containers.py", line 404, in start
localstack_1        |     return self.client.api.start(self.id, **kwargs)
localstack_1        |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/docker/utils/decorators.py", line 19, in wrapped
localstack_1        |     return f(self, resource_id, *args, **kwargs)
localstack_1        |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/docker/api/container.py", line 1111, in start
localstack_1        |     self._raise_for_status(res)
localstack_1        |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/docker/api/client.py", line 270, in _raise_for_status
localstack_1        |     raise create_api_error_from_http_exception(e)
localstack_1        |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
localstack_1        |     raise cls(e, response=response, explanation=explanation)
localstack_1        | docker.errors.APIError: 400 Client Error for http+docker://localhost/v1.41/containers/cea0db10eafcec866aaedb6d45048e060f978d44843dae4e9282a1fb75340837/start: Bad Request ("OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/tmp/e965911c.sh": stat /tmp/e965911c.sh: no such file or directory: unknown")
localstack_1        | 
localstack_1        | During handling of the above exception, another exception occurred:
localstack_1        | 
localstack_1        | Traceback (most recent call last):
localstack_1        |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/localstack_ext/services/awslambda/lambda_extended.py.enc", line 458, in do_run_lambda_executor
localstack_1        |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/localstack_ext/services/awslambda/lambda_launcher.py.enc", line 343, in docker_reuse_execute_in_container
localstack_1        |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/localstack_ext/services/awslambda/lambda_launcher.py.enc", line 242, in custom_image_execute_in_container
localstack_1        |   File "/opt/code/localstack/localstack/utils/docker_utils.py", line 1541, in run_container
localstack_1        |     result = self.start_container(
localstack_1        |   File "/opt/code/localstack/localstack/utils/docker_utils.py", line 1418, in start_container
localstack_1        |     raise ContainerException()
localstack_1        | localstack.utils.docker_utils.ContainerException
localstack_1        | 2021-12-15T20:09:24.960:INFO:localstack_ext.services.awslambda.lambda_extended: Lambda container output: None
localstack_1        | None
```

The lambda is getting created like this
```bash
awslocal lambda create-function \
  --function-name kb-service-upload-handler \
  --code ImageUri=kb-service-upload-handler \
  --role arn:aws:iam::000000000000:role/test \
  --handler "src.upload_handler.main.handler" \
  --package-type Image
```

It appears the code inside the lambda never gets invoked.

### Expected Behavior

The lambda should be invoked successfully.

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)
```
    docker-compose up
```
#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

```
awslocal lambda create-function \
  --function-name kb-service-upload-handler \
  --code ImageUri=kb-service-upload-handler \
  --role arn:aws:iam::000000000000:role/test \
  --handler "src.upload_handler.main.handler" \
  --package-type Image

awslocal s3api put-bucket-notification-configuration \
  --bucket client-uploads \
  --notification-configuration file://notification.json
```


### Environment

```markdown
- OS: Ubuntu
- LocalStack: latest
```


### Anything else?

_No response_
invocation_context.stage_variables = helpers.get_stage_variables(invocation_context)
                request_templates = RequestTemplates()
                payload = request_templates.render(invocation_context)
            except Exception as e:
                LOG.warning("Unable to convert API Gateway payload to str", e)
                raise
            
            headers = aws_stack.mock_aws_request_headers(
                service="kinesis", region_name=invocation_context.region_name
            )
            headers["X-Amz-Target"] = target
            result = common.make_http_request(
                url=config.service_url("kineses"), data=payload, headers=headers, method="POST"
            )
            
            invocation_context.response = result
            response_templates = ResponseTemplates()
            response_templates.render(invocation_context)
            return invocation_context.response
        elif "states:action/" in uri:
            action = uri.split("/")[-1]
            if APPLICATION_JSON in integration.get("requestTemplates", {}):
                request_templates = RequestTemplates()
                payload = request_templates.render(invocation_context)
                payload = json.loads(payload)
            else:
                
                payload = json.loads(data.decode("utf-8"))
            client = aws_stack.connect_to_service("stepfunctions")
            if isinstance(payload.get("input"), dict):