# The minimal kafka service # github.com/yeasy/docker-compose-files # * zk: zk node for kafka # * kafka: kafka service, will default to connect to zookeeper # * cli: client to test kafka service version: '2' services: zookeeper: image: yeasy/kafka:0.11.0.1 container_name: zookeeper hostname: zookeeper ports: - "2181:2181" # zk connection port command: bash -c 'bash /tmp/start_zk.sh' kafka: # kafka service image: yeasy/kafka:0.11.0.1 container_name: kafka hostname: kafka ports: - "9092:9092" depends_on: - zookeeper command: bash -c 'bash /tmp/start_kafka.sh' cli: # used for testing kafka cmds, see /tmp/*.sh image: yeasy/kafka:0.11.0.1 container_name: cli hostname: cli environment: - ZK_HOST=zookeeper # zk host to connect to command: bash -c 'while true; do sleep 20170915; done'