From 0c1471adb9f6f4cb1c41b5df68433d221790c6bf Mon Sep 17 00:00:00 2001 From: Leon Brandt Date: Thu, 17 Sep 2020 08:27:46 +0200 Subject: [PATCH] Add Dockerfile --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..369e081 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +ARG BUILD_HOME=/usr/app + +FROM openjdk:8 AS BUILD +ARG BUILD_HOME +WORKDIR $BUILD_HOME +COPY build.gradle settings.gradle gradlew ./ +COPY gradle ./gradle/ +COPY . . +RUN ./gradlew clean jar copyRuntimeLibs --no-daemon + +FROM strimzi/kafka:0.18.0-kafka-2.5.0 +ARG BUILD_HOME +ENV KAFKA_LIB_DIR=/opt/kafka/libs +# Copy build-product +COPY --from=BUILD $BUILD_HOME/build/libs/ $KAFKA_LIB_DIR/ +# Copy runtime libs +COPY --from=BUILD $BUILD_HOME/build/output/lib/ $KAFKA_LIB_DIR/