Kong command is not recognised after docker run

Installed Kong as a docker image. I could open http://localhost:8001, which list downs the content of yaml etc. but when I try to run the migration script, i see following error! any idea what’s wrong?

I followed the installation instruction as mentioned in this link - https://docs.konghq.com/install/docker/

PS C:\WINDOWS\system32> kong migrations bootstrap [-c /path/to/kong.conf]
kong : The term 'kong' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and     try again.
At line:1 char:1
kong migrations bootstrap [-c /path/to/kong.conf]
CategoryInfo          : ObjectNotFound: (kong:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException

Hi Sanjay,

It looks like you are running this directly from Powershell but should be run from within a container, ie:

docker run --rm \
     --network=kong-net \
     -e "KONG_DATABASE=postgres" \
     -e "KONG_PG_HOST=kong-database" \
     -e "KONG_PG_USER=kong" \
     -e "KONG_PG_PASSWORD=kong" \
     -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \
     kong:latest kong migrations bootstrap

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ