Skip to main content
CommunityTeamEnterprise

Docker

info

Kpow Docker images are hosted at Docker Hub.

To connect the latest Kpow Docker image to a Kafka cluster:

  • Get a Community or Free trial license. See: Trials and Licenses.
  • Create a configuration file (config.env) that contains your connection, license, and feature variables.
  • Start a Docker container using the appropriate Kpow image.

Start a Kpow instance

Below is a sample config.env file that defines your Kafka connection and Kpow instance settings. Make sure to include valid license details from your license email. For a full list of supported options, see the environment variables reference.

## Name your Kpow installation (this appears in the UI)
ENVIRONMENT_NAME=Trade Book (Staging)
## The Kafka Bootstrap URL for your cluster (Required).
BOOTSTRAP=kafka-1:9092,kafka-2:9092,kafka-3:9092

## Your license details (Required).
## These parameters can be cut/paste from your license email
LICENSE_ID=1c99v4-f690-4a4f-b144-73de2369444a
LICENSE_CODE=KPOW_COMMUNITY
LICENSEE=My Corp
LICENSE_EXPIRY=2020-09-05
LICENSE_SIGNATURE=15CFFF969111DB6DCA142B6F1E0065F94A614251B80128D52C2CD45993A021AE10E90F57B90FF76CC1B992C16E54BCF1CBE7E5EE3124B3E585BE133774836A6EBB51B55E67EF60F4A435EBEC9F07A26CEABDCF6E3CF4137A33201E7662AF1F7986E57341E0EAEB884BBF320C348D62679F521259DAD1E03F6F79DB53D83CD41B

With your configuration file in place, start Kpow using the following command:

docker run -p 3000:3000 --env-file ./config.env -m 2G factorhouse/kpow-ce:latest

Once running, Kpow will be available at http://localhost:3000.

Accessing files on the host Machine

Sometimes Kpow needs access to files from the host machine—for example:

  1. RBAC YAML configuration
  2. Keystore or Truststore files
  3. Metadata.xml for SSO integration

You can expose these files to the container using a volume mount:

docker run --volume="$PWD/config:/config" -p 3000:3000 \
--env-file ./config.env -m 4G factorhouse/kpow:latest

In config.env, reference the files using their mounted path:

SSL_TRUSTSTORE_LOCATION=/config/ssl/truststore.jks

Connect Kafka within Docker

To connect Kpow with a Kafka cluster running inside Docker, it's recommended to use a dedicated Docker network. This allows containers to reference each other by hostname.

## Create a docker network to be shared
docker network create factorhouse

## Start a Kafka broker
docker run -d -p 2181:2181 --hostname zookeeper --network factorhouse \
-e ZOOKEEPER_CLIENT_PORT=2128 \
confluentinc/cp-zookeeper:7.8.0

docker run -d -p 9092:9092 --hostname kafka-1 --network factorhouse \
-e KAFKA_BROKER_ID=1 \
-e KAFKA_ZOOKEEPER_CONNECT=zookeeper:2128 \
-e KAFKA_ADVERTISED_LISTENERS="LISTENER_DOCKER_INTERNAL://kafka-1:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092" \
confluentinc/cp-kafka:7.8.0

## Start a Kpow instance
docker run -d -p 3000:3000 --network factorhouse \
--env-file=./config.env \
factorhouse/kpow:latest
tip

Make sure to include BOOTSTRAP=kafka-1:19092 in your config.env file so Kpow can connect to the Kafka broker using the internal Docker hostname.