Install Kong Api Gateway on Docker Windows
Today i want to explain how to install Kong Api Gateway on your Windows Docker Desktop.
This is the official guide but there are some error ( https://hub.docker.com/_/kong )
I have used PostreSQL. In the official guide there is not a “Password” for database and so it do error.
Open a command line and insert this three command.
On your docker desktop client than you must to see the 2 container for database and api gateway.
1. Link Kong to either a Cassandra or PostgreSQL container
docker run -d --name kong-database ^ -p 5432:5432 ^ -e "POSTGRES_USER=kong" ^ -e "POSTGRES_DB=kong" ^ -e "POSTGRES_PASSWORD=kong" ^ postgres:9.6
2. Prepare your database
docker run --rm ^ --link kong-database:kong-database ^ -e "KONG_DATABASE=postgres" ^ -e "KONG_PG_HOST=kong-database" ^ -e "KONG_PG_PASSWORD=kong" ^ kong kong migrations bootstrap
docker run -d --name kong ^ --link kong-database:kong-database ^ -e "KONG_DATABASE=postgres" ^ -e "KONG_PG_HOST=kong-database" ^ -e "KONG_PG_PASSWORD=kong" ^ -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, 0.0.0.0:8444 ssl" ^ -p 8000:8000 ^ -p 8443:8443 ^ -p 8001:8001 ^ -p 8444:8444 ^ kong
Have fun!