0

I am trying to use Gravitee locally. I installed it using Docker with the official documentation : https://docs.gravitee.io/apim/3.x/apim_installation_guide_docker_compose_quickstart.html

This is the docker-compose file they provide : https://raw.githubusercontent.com/gravitee-io/gravitee-docker/master/apim/3.x/docker-compose.yml

I use Windows 10 with WSL 2 (Ubuntu 20.04). Docker is installed on WSL 2 and I have Docker Desktop for Windows.

The problem is that I have my API running locally : http://localhost:5002. I would like to create an API in gravitee with the context-path /test and with the entry point http://localhost:5002.

But the gateway container (docker) can not access localhost.

If I try to curl http://localhost:5002 from the container, I get this error :

curl: (7) Failed to connect to localhost port 5002 after 0 ms: Couldn't connect to server

I tried to use : host.docker.internal

With the same error :

/opt/graviteeio-gateway # curl http://host.docker.internal:5002 --verbose
*   Trying 192.168.65.254:5002...
* connect to 192.168.65.254 port 5002 failed: Connection refused
* Failed to connect to host.docker.internal port 5002 after 2040 ms: Couldn't connect to server
* Closing connection 0
curl: (7) Failed to connect to host.docker.internal port 5002 after 2040 ms: Couldn't connect to server

I also tried to get the IP from WSL 2 :

cat /etc/resolve.conf

curl http://172.20.192.1:5002

But I got the same error

Do you have any idea what could resolve my problem ?

Erwan PLB
  • 3
  • 2

0 Answers0