Bootstrap FreeKB - Konga - Install Konga on Docker
Konga - Install Konga on Docker

Updated:   |  Konga articles

This assumes that you have a running Kong Gateway container and a running Kong Postgres container.

A Docker image contains the code used to create a Docker container, such as creating a Nginx web server, or a mySQL server, or a home grown app, and the list goes on. In this way, an image is like a template used to create a container. An image is kind of like a virtual machine, but much more light weight, using significantly less storage a memory (containers are usually megabytes in size).

 

The docker pull command can be used to pull down the Konga image.

docker pull pantsel/konga

 

Or you could create Dockerfile so that the Dockerfile contains something like this.

FROM pantsel/konga

 

Then use the docker build command to create the image, running this command in the same directory as the Dockerfile.

docker build . --tag konga:latest

 

The docker images command can then be used to confirm the Konga image was pulled down.

~]# docker images
REPOSITORY         TAG     IMAGE ID      CREATED       SIZE
pantsel/konga      latest  105b54dc64f1  32 hours ago  409 MB

 

Create and start the Konga container

docker run 
--network <optional, the name of your dedicated Kong network on Docker>
--publish 1337:1337
--name konga
--restart unless-stopped
--detach
pantsel/konga:latest

 

You should then be able to access Konga at http://<hostname or IP address Docker server>:1337.

 

Here are some additional options, to use the Postgres container.

docker run 
--network <the name of your dedicated Kong network on Docker>
--publish 1337:1337
--name konga
--env DB_ADAPTER=<postgres or mongo or sqlserver or mysql>
--env DB_HOST=<the name or ID of your Kong Postgres container>
--env DB_USER=<your Postgres username>
--env DB_PASSWORD=<your Postgres users password>
--env DB_DATABASE=kong
--env NODE_ENV=<development or production>
pantsel/konga:latest &

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 14c34c in the box below so that we can be sure you are a human.