### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

`PORTS_CHECK_DOCKER_IMAGE` is not configurable which prevents ECS tasks from running on air-gapped environment



### Expected Behavior

`PORTS_CHECK_DOCKER_IMAGE` can be configured via configuration option to allow use of any available image 

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

Run an ECS task in an environment where localstack/localstack is not available.

### Environment

```markdown
- OS: RHEL8
- Docker runtime version: Podman v4.2.0
- LocalStack: 1.3.1
```


### Anything else?

_No response_
"""
    Returns True if running in a docker container, else False
    Ref. https://docs.docker.com/config/containers/runmetrics/#control-groups
    """
    if OVERRIDE_IN_DOCKER:
        return True
    
    if os.path.exists("/.dockerenv"):
        return True
    if os.path.exists("/run/.containerenv"):
        return True
    if not os.path.exists("/proc/1/cgroup"):
        return False
    try:
        if any(
            [
                os.path.exists("/sys/fs/cgroup/memory/docker/"),
                any(
                    "docker-" in file_names
                    for file_names in os.listdir("/sys/fs/cgroup/memory/system.slice")
                ),
                os.path.exists("/sys/fs/cgroup/docker/"),
                any(
                    "docker-" in file_names
                    for file_names in os.listdir("/sys/fs/cgroup/system.slice/")
                ),
            ]
        ):