title: why should i use docker image "confluentinc/kafka" to kafka cluster?
body: <p>I did </p>
  
  <pre><code>docker-compose up
  </code></pre>
  
  <p>for kafka clustering in my local.</p>
  
  <p>and whenever i want to make topic, retrieve topics i have or search data stored in the topic i use </p>
  
  <pre><code>docker run --net=host --rm confluentinc/cp-kafka:latest kafka-topics --describe --topic bar --zookeeper localhost:32181
  </code></pre>
  
  <p>which is on the official kafka clustering deployment site.</p>
  
  <p>However i really want to use Kafka in my local storage not the kafka docker image like</p>
  
  <pre><code>kafka-topics --describe --topic bar --zookeeper localhost:32181
  </code></pre>
  
  <p>if i use the code above i face this error.</p>
  
  <pre><code>Exception in thread "main" kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
          at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected$3(ZooKeeperClient.scala:258)
  </code></pre>
  
  <p>Besides if i check <strong>netstat -anp tcp</strong>
  there is no LISTEN ports from kafka cluster.</p>
  
  <p>What am i supposed to do ?
  and please let me know what i am missing now about docker (because i am really new to docker :( )</p>
  
  <p><strong>This is yaml configuration</strong></p>
  
  <pre><code>---
  version: '2'
  services:
    zookeeper-1:
      image: confluentinc/cp-zookeeper:latest
      environment:
        ZOOKEEPER_SERVER_ID: 1
        ZOOKEEPER_CLIENT_PORT: 22181
        ZOOKEEPER_TICK_TIME: 2000
        ZOOKEEPER_INIT_LIMIT: 5
        ZOOKEEPER_SYNC_LIMIT: 2
        ZOOKEEPER_SERVERS: localhost:22888:23888;localhost:32888:33888;localhost:42888:43888
      network_mode: host
      extra_hosts:
        - "moby:127.0.0.1"
  
    zookeeper-2:
      image: confluentinc/cp-zookeeper:latest
      environment:
        ZOOKEEPER_SERVER_ID: 2
        ZOOKEEPER_CLIENT_PORT: 32181
        ZOOKEEPER_TICK_TIME: 2000
        ZOOKEEPER_INIT_LIMIT: 5
        ZOOKEEPER_SYNC_LIMIT: 2
        ZOOKEEPER_SERVERS: localhost:22888:23888;localhost:32888:33888;localhost:42888:43888
      network_mode: host
      extra_hosts:
        - "moby:127.0.0.1"
  
    zookeeper-3:
      image: confluentinc/cp-zookeeper:latest
      environment:
        ZOOKEEPER_SERVER_ID: 3
        ZOOKEEPER_CLIENT_PORT: 42181
        ZOOKEEPER_TICK_TIME: 2000
        ZOOKEEPER_INIT_LIMIT: 5
        ZOOKEEPER_SYNC_LIMIT: 2
        ZOOKEEPER_SERVERS: localhost:22888:23888;localhost:32888:33888;localhost:42888:43888
      network_mode: host
      extra_hosts:
        - "moby:127.0.0.1"
  
    kafka-1:
      image: confluentinc/cp-kafka:latest
      network_mode: host
      depends_on:
        - zookeeper-1
        - zookeeper-2
        - zookeeper-3
      environment:
        KAFKA_BROKER_ID: 1
        KAFKA_ZOOKEEPER_CONNECT: localhost:22181,localhost:32181,localhost:42181
        KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:19092
      extra_hosts:
        - "moby:127.0.0.1"
  
    kafka-2:
      image: confluentinc/cp-kafka:latest
      network_mode: host
  "docker-compose.yml" 83L, 2321C
  </code></pre>