title: Problem orchestrating Apache Flink and kafka with docker compose
body: <ul>
  <li>I am new to flink and trying to create a docker-compose configuration which contains kafka and flink task manager and Jobmanager docker configs.</li>
  <li><p>After starting the containers with docker-compose i am trying to consume kafka messages from Flink consumer, but flink consumer is not consuming messages from kafka.</p></li>
  <li><p>I have tried multiple configurations for the docker compose configs but nothing worked.</p>
  
  <p>version: "2.1"</p>
  
  <p>networks:   app-tier:
      driver: bridge</p>
  
  <p>services:   jobmanager:
      image: ${FLINK_DOCKER_IMAGE_NAME:-flink}
      expose:
        - "6123"
      ports:
        - "8081:8081"
      command: jobmanager
      links:
        - "kafka:kafka"
      environment:
        - JOB_MANAGER_RPC_ADDRESS=jobmanager
      networks:
        - app-tier   taskmanager:
      image: ${FLINK_DOCKER_IMAGE_NAME:-flink}
      expose:
        - "6121"
        - "6122"
      depends_on:
        - jobmanager
      command: taskmanager
      links:
        - "jobmanager:jobmanager"
        - "kafka:kafka"
      environment:
        - JOB_MANAGER_RPC_ADDRESS=jobmanager
      networks:
        - app-tier</p>
  
  <p>kafka:    image: wurstmeister/kafka:0.10.2.0    hostname: kafka    ports:
      - "9092:9092"    environment:
      KAFKA_ADVERTISED_HOST_NAME: localhost
      KAFKA_ADVERTISED_PORT: 9092
      KAFKA_CREATE_TOPICS: "EVENT_STREAM_INPUT:1:1,EVENT_STREAM_OUTPUT:1:1,"
      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181    depends_on:
      - zookeeper    networks:
       - app-tier</p>
  
  <p>zookeeper:    image: zookeeper    restart: always    hostname: zoo1  ports:
      - "2181:2181"    environment:
      ZOO_MY_ID: 1    networks:
       - app-tier</p></li>
  </ul>
  
  <p>It should start the containers and they must be able to communicate among each other while i am able to ping the kafka container from inside taskmanager and jobmanager containers but the Flink consumer application is not able to consume kafka messsages.</p>