Eigenes Kafka-Image von `cp-kafka` mit cruis-control-JAR abgeleitet
[demos/kafka/training] / README.sh
index 6ebd03f..c4290b6 100755 (executable)
--- a/README.sh
+++ b/README.sh
@@ -1,6 +1,7 @@
 #!/bin/bash
 
-IMAGE=juplo/cruise-control
+IMAGE_CRUISECONTROL=juplo/cruise-control
+IMAGE_KAFKA=juplo/kafka
 
 if [ "$1" = "cleanup" ]
 then
@@ -9,17 +10,26 @@ then
   exit
 fi
 
-docker-compose -f docker/docker-compose.yml up -d --remove-orphans kafka-1 kafka-2 kafka-3
-
 if [[
-  $(docker image ls -q $IMAGE) == "" ||
+  $(docker image ls -q $IMAGE_CRUISECONTROL) == "" ||
   "$1" = "build"
 ]]
 then
   DOCKER_BUILDKIT=0 docker build -t juplo/cruise-control cruise-control || exit 1
 else
   echo "Using image existing images:"
-  docker image ls $IMAGE
+  docker image ls $IMAGE_CRUISECONTROL
+fi
+
+if [[
+  $(docker image ls -q $IMAGE_KAFKA) == "" ||
+  "$1" = "build"
+]]
+then
+  DOCKER_BUILDKIT=0 docker build -t juplo/kafka kafka || exit 1
+else
+  echo "Using image existing images:"
+  docker image ls $IMAGE_KAFKA
 fi
 
 docker-compose -f docker/docker-compose.yml up --remove-orphans setup || exit 1