FROM openjdk:11-jre
VOLUME /tmp
COPY target/*.jar /opt/app.jar
-ENTRYPOINT [ "java", "-jar", "/opt/app.jar", "kafka:9092", "test" ]
-CMD [ "DCKR" ]
+ENTRYPOINT [ "java", "-jar", "/opt/app.jar" ]
+CMD []
if [ "$1" = "cleanup" ]
then
- docker-compose down -v
+ docker-compose down -v --remove-orphans
mvn clean
exit
fi
fi
docker-compose up setup
+docker-compose ps
docker-compose up producer
-docker-compose exec cli kafkacat -b kafka:9092 -t test -q -e -f'topic=%t\tpartition=%p\toffset=%o\tkey=%k\tvalue=%s\n'
+docker-compose exec cli kafkacat -b kafka:9092 -t test -e -f'topic=%t\tpartition=%p\toffset=%o\tkey=%k\tvalue=%s\n'
depends_on:
- kafka-0
+
setup:
image: juplo/toolbox
command: >
cli:
image: juplo/toolbox
command: sleep infinity
+ depends_on:
+ - kafka-1
+ - kafka-2
+ - kafka-3
producer:
image: juplo/supersimple-producer:1.0-SNAPSHOT
<groupId>de.juplo.kafka</groupId>
<artifactId>supersimple-producer</artifactId>
- <version>1.0-SNAPSHOT</version>
<name>Super Simple Producer</name>
<description>Most minimal Kafka Producer ever!</description>
+ <version>1.0-SNAPSHOT</version>
<properties>
<java.version>11</java.version>