### 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_
Description="There is no software update available for this domain.",
            AutomatedUpdateDate=datetime.fromtimestamp(0, tz=timezone.utc),
            OptionalDeployment=True,
        ),
        DomainEndpointOptions=DomainEndpointOptions(
            EnforceHTTPS=False,
            TLSSecurityPolicy=TLSSecurityPolicy.Policy_Min_TLS_1_0_2019_07,
            CustomEndpointEnabled=False,
        ),
        AdvancedSecurityOptions=AdvancedSecurityOptions(
            Enabled=False, InternalUserDatabaseEnabled=False
        ),
        AutoTuneOptions=AutoTuneOptionsOutput(State=AutoTuneState.ENABLE_IN_PROGRESS),
    )
    if stored_status.get("Endpoint"):
        new_status["Endpoint"] = new_status.get("Endpoint")
    return new_status
def _ensure_domain_exists(arn: ARN) -> None:
    """
    Checks if the domain for the given ARN exists. Otherwise, a ValidationException is raised.
    :param arn: ARN string to lookup the domain for
    :return: None if the domain exists, otherwise raises an exception
    :raises: ValidationException if the domain for the given ARN cannot be found
    """
    domain_key = DomainKey.from_arn(arn)
    region = OpenSearchServiceBackend.get(domain_key.region)
    domain_status = region.opensearch_domains.get(domain_key.domain_name)
    if domain_status is None:
        raise ValidationException("Invalid ARN. Domain not found.")
def _update_domain_config_request_to_status(request: UpdateDomainConfigRequest) -> DomainStatus: