I’m trying to deploy a gateway on my local machine using a Dockerfile modeled after the one in the official documentation: Build your own Docker images - Kong Gateway - v3.9.x | Kong Docs
I also deployed another container with a PostgreSQL database using the instructions on the basic docker deployment documentation (only the first 3 steps for deploying and preparing the DB): Install Kong Gateway on Docker - v3.9.x | Kong Docs
The issue I’m having is that when I try to curl the URL, I can’t seem to get it to connect
Docker run command:
docker run -d --name kong-gw-test --network=kong-net -e “KONG_DATABASE=postgres” -e “KONG_PG_HOST=kong-database” -e “KONG_PG_USER=kong” -e “KONG_PG_PASSWORD=kongpass” -e “KONG_PROXY_ACCESS_LOG=/dev/stdout” -e “KONG_ADMIN_ACCESS_LOG=/dev/stdout” -e “KONG_PROXY_ERROR_LOG=/dev/stderr” -e “KONG_ADMIN_ERROR_LOG=/dev/stderr” -e “KONG_ADMIN_LISTEN=0.0.0.0:8001” -e “KONG_ADMIN_GUI_URL=http://localhost:8002” -p 8000:8000 -p 8443:8443 -p 8001:8001 -p 8444:8444
Error:
curl: (7) Failed to connect to localhost port 8001 after 0 ms: Couldn’t connect to server