I have an API running on my host machine on port 8000. Meanwhile, I have a docker compose cluster with one container that's supposed to connect said API. To get the url for the request, I use "host.docker.internal:8000" on my windows machine and it works wonderfully. However, I have a linux deployment server and in there, "host.docker.internal" doesn't resolve to anything, causing a connection error to the API. I saw on another [post on stackoverflow](https://stackoverflow.com/questions/31324981/how-to-access-host-port-from-docker-container/61424570#61424570), that you solve this on linux by adding the following on your `docker-compose.yaml`

```yaml
services:
  service_name:
    extra_hosts:
      - host.docker.internal:host-gateway

```

This added the docker0 IP to `/etc/hosts`, but when I try to do a GET request, the resulting message is:

`Failed to connect to host.docker.internal port 8000: Connection refused`

I'm really confused right now. I don't know if this is a firewall issue, a docker issue, a docker compose issue, a docker on linux issue. Please help...