diff --git a/.gitignore b/.gitignore index 7ac8981..63fd316 100644 --- a/.gitignore +++ b/.gitignore @@ -107,3 +107,6 @@ ENV/ # Vagrant .vagrant/ + +#mac os DS_Store +.DS_Store diff --git a/examples/wordcount/docker/docker-compose.yml b/examples/wordcount/docker/docker-compose.yml index 4a97ddb..5f85440 100644 --- a/examples/wordcount/docker/docker-compose.yml +++ b/examples/wordcount/docker/docker-compose.yml @@ -18,21 +18,21 @@ services: - kafka kafka: image: "spotify/kafka" - hostname: kafka + hostname: localhost ports: - 2181:2181 - 9092:9092 - 7203:7203 environment: - JMX_PORT=7203 - - ADVERTISED_HOST=kafka + - ADVERTISED_HOST=localhost - ADVERTISED_PORT=9092 kafka-manager: image: "sheepkiller/kafka-manager" ports: - 9000:9000 environment: - - ZK_HOSTS=kafka:2181 + - ZK_HOSTS=localhost:2181 - APPLICATION_SECRET=letmein kafka-debug: build: diff --git a/examples/wordcount/docker/kafka-debug/Dockerfile b/examples/wordcount/docker/kafka-debug/Dockerfile index bcc7881..3bbb891 100644 --- a/examples/wordcount/docker/kafka-debug/Dockerfile +++ b/examples/wordcount/docker/kafka-debug/Dockerfile @@ -5,14 +5,15 @@ ENV SCALA_VERSION 2.11 ENV KAFKA_VERSION 0.10.1.0 ENV KAFKA_HOME /opt/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION" + # Install Kafka and other needed things RUN apt-get update && \ apt-get install -y wget dnsutils && \ rm -rf /var/lib/apt/lists/* && \ apt-get clean && \ - wget -q http://apache.mirrors.spacedump.net/kafka/"$KAFKA_VERSION"/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz -O /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz && \ + wget -q http://archive.apache.org/dist/kafka/"$KAFKA_VERSION"/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz -O /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz && \ tar xfz /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz -C /opt && \ rm /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz -CMD ["/opt/kafka_2.11-0.10.1.0/bin/kafka-console-consumer.sh","--bootstrap-server","kafka:9092","--topic","wks-wordcount-example-count","--from-beginning","--property","print.key=true"] +CMD ["$KAFKA_HOME/bin/kafka-console-consumer.sh","--bootstrap-server","localhost:9092","--topic","wks-wordcount-example-count","--from-beginning","--property","print.key=true"]