### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

I am using below docker-compose file to start the localstack container with es service
```
version: "3"
services:
  wiremock:
    image: "rodolpheche/wiremock"
    ports:
      - "8080"
  localstack:
    image: "localstack/localstack-full:0.14.2"
    ports:
      - "4566"
      - "4510:4510"
    environment:
      AWS_ACCESS_KEY_ID: "local-access-key-id"
      AWS_SECRET_ACCESS_KEY: "local-secret-access-key"
      HOSTNAME_EXTERNAL: "localstack"
      OPENSEARCH_ENDPOINT_STRATEGY: "port"
      SERVICES: "es"
      EDGE_PORT: "4566"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"

```

running `aws --region ap-south-1 --endpoint-url http://localstack:4566 es create-elasticsearch-domain --domain-name my-domain` to create domain
this command is returning `localhost:4510` as an endpoint, I am able to curl `curl localhost:4510` within localstack bash but 
neither on the host machine nor in `wiremock` container.



### Expected Behavior

I should able to access elastic search domain in host machine as well in another container

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

#### How are you starting localstack

 ```
version: "3"
services:
  wiremock:
    image: "rodolpheche/wiremock"
    ports:
      - "8080"
  localstack:
    image: "localstack/localstack-full:0.14.2"
    ports:
      - "4566"
      - "4510:4510"
    environment:
      AWS_ACCESS_KEY_ID: "local-access-key-id"
      AWS_SECRET_ACCESS_KEY: "local-secret-access-key"
      HOSTNAME_EXTERNAL: "localstack"
      OPENSEARCH_ENDPOINT_STRATEGY: "port"
      SERVICES: "es"
      EDGE_PORT: "4566"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"

```

#### Client commands

    aws --region ap-south-1 --endpoint-url http://localstack:4566 es create-elasticsearch-domain --domain-name my-domain


### Environment

```markdown
- OS:
- LocalStack:
```


### Anything else?

_No response_
indices = ["index1", "index2"]
        for index_name in indices:
            index_path = f"{opensearch_endpoint}/{index_name}"
            requests.put(index_path, headers=COMMON_HEADERS)
            endpoint = f"{opensearch_endpoint}/_cat/indices/{index_name}?format=json&pretty"
            req = requests.get(endpoint)
            assert req.status_code == 200
            req_result = json.loads(req.text)
            assert req_result[0]["health"] in ["green", "yellow"]
            assert req_result[0]["index"] in indices
    def test_get_document(self, opensearch_document_path):
        response = requests.get(opensearch_document_path)
        assert (
            "I'm just a simple man" in response.text
        ), f"document not found({response.status_code}): {response.text}"
    def test_search(self, opensearch_endpoint, opensearch_document_path):
        index = "/".join(opensearch_document_path.split("/")[:-2])
        
        response = requests.post(f"{opensearch_endpoint}/_refresh", headers=COMMON_HEADERS)
        assert response.ok
        search = {"query": {"match": {"last_name": "Fett"}}}
        response = requests.get(f"{index}/_search", data=json.dumps(search), headers=COMMON_HEADERS)
        assert (
            "I'm just a simple man" in response.text
        ), f"search unsuccessful({response.status_code}): {response.text}"
    def test_endpoint_strategy_path(self, monkeypatch, opensearch_create_domain, opensearch_client):