Docker runs kafka manager

  kafka

Order

This article briefly introduces how docker runs kafka and kafka manager.

mirror image

docker pull dockerkafka/zookeeper
docker pull dockerkafka/kafka
docker pull dockerkafka/kafka-manager

Start up

docker run -it --rm --name kafkadocker_zookeeper_1 -p 2181:2181 dockerkafka/zookeeper

docker run -it --rm --name kafkadocker_kafka_1 --link kafkadocker_zookeeper_1:zookeeper -p 9092:9092 dockerkafka/kafka

docker run -it --rm --link kafkadocker_zookeeper_1:zookeeper --link kafkadocker_kafka_1:kafka -p 9000:9000 -e ZK_HOSTS=zookeeper:2181 dockerkafka/kafka-manager

You can also compose the startup

zookeeper:
  image: dockerkafka/zookeeper
  ports:
   - "2181:2181"
   - "2888:2888"
   - "3888:3888"
   - "5000:5000"

kafka:
  image: dockerkafka/kafka
  ports:
    - "9092:9092"
  links:
    - zookeeper:zookeeper

kafka-manager:
  image: dockerkafka/kafka-manager
  environment:
  - ZK_HOSTS=zookeeper:2181
  ports:
    - "9000:9000"
  links:
    - zookeeper:zookeeper
    - kafka:kafka
  volumes:
    - ./image/conf:/opt/kafka-manager-1.2.7/conf

Access

192.178.99.100:9000, then add cluster, where zk address is zookeeper:2181

Bug, clearly docker is kafka0.9, this manager interface does have only version 0.8 to choose from

doc