Dockerfile für Cruise Control in Unterverzeichnis verschoben
authorKai Moritz <kai@juplo.de>
Fri, 10 Nov 2023 10:49:03 +0000 (11:49 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 10 Nov 2023 12:39:26 +0000 (13:39 +0100)
Dockerfile [deleted file]
README.sh
cruise-control/Dockerfile [new file with mode: 0644]

diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644 (file)
index fe9d7bd..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-ARG VERSION=7.5.1
-
-FROM eclipse-temurin:17-jdk-focal
-
-RUN apt update
-RUN apt install -y git
-WORKDIR /tmp
-RUN git clone -b migrate_to_kafka_2_5 https://github.com/linkedin/cruise-control.git
-WORKDIR cruise-control
-RUN ./gradlew jar
-  
-FROM confluentinc/cp-kafka-connect:${VERSION}
-USER root
-COPY --from=0 /tmp/cruise-control/config /opt/cruise-control/config/
-COPY --from=0 /tmp/cruise-control/cruise-control/build /opt/cruise-control/cruise-control/build/
-COPY --from=0 /tmp/cruise-control/kafka-cruise-control-start.sh /opt/cruise-control/
-WORKDIR /opt/cruise-control
-RUN wget -O - https://github.com/linkedin/cruise-control-ui/releases/download/v0.4.0/cruise-control-ui-0.4.0.tar.gz | tar -xzv
-ENV BOOTSTRAP_SERVERS=localhost:9092
-ENV ZOOKEEPER_CONNECT=localhost:2181
-RUN echo -e '#!/bin/bash\n sed -ie "s+^bootstrap\.servers=.*$+bootstrap.servers=${BOOTSTRAP_SERVERS}+;s+^zookeeper\.connect=.*$+zookeeper.connect=${ZOOKEEPER_CONNECT}+" config/cruisecontrol.properties\nexec ./kafka-cruise-control-start.sh "$@"' > run.sh; chmod a+x run.sh
-ENTRYPOINT [ "/opt/cruise-control/run.sh" ]
-CMD [ "config/cruisecontrol.properties" ]
index d228c29..6ebd03f 100755 (executable)
--- a/README.sh
+++ b/README.sh
@@ -16,7 +16,7 @@ if [[
   "$1" = "build"
 ]]
 then
-  DOCKER_BUILDKIT=0 docker build -t juplo/cruise-control . || exit 1
+  DOCKER_BUILDKIT=0 docker build -t juplo/cruise-control cruise-control || exit 1
 else
   echo "Using image existing images:"
   docker image ls $IMAGE
diff --git a/cruise-control/Dockerfile b/cruise-control/Dockerfile
new file mode 100644 (file)
index 0000000..bd2fe30
--- /dev/null
@@ -0,0 +1,23 @@
+ARG VERSION=7.5.1
+
+FROM eclipse-temurin:17-jdk-focal
+
+RUN apt update
+RUN apt install -y git
+WORKDIR /tmp
+RUN git clone -b migrate_to_kafka_2_5 https://github.com/linkedin/cruise-control.git
+WORKDIR cruise-control
+RUN ./gradlew jar
+
+FROM confluentinc/cp-kafka-connect:${VERSION}
+USER root
+COPY --from=0 /tmp/cruise-control/config /opt/cruise-control/config/
+COPY --from=0 /tmp/cruise-control/cruise-control/build /opt/cruise-control/cruise-control/build/
+COPY --from=0 /tmp/cruise-control/kafka-cruise-control-start.sh /opt/cruise-control/
+WORKDIR /opt/cruise-control
+RUN wget -O - https://github.com/linkedin/cruise-control-ui/releases/download/v0.4.0/cruise-control-ui-0.4.0.tar.gz | tar -xzv
+ENV BOOTSTRAP_SERVERS=localhost:9092
+ENV ZOOKEEPER_CONNECT=localhost:2181
+RUN echo -e '#!/bin/bash\n sed -ie "s+^bootstrap\.servers=.*$+bootstrap.servers=${BOOTSTRAP_SERVERS}+;s+^zookeeper\.connect=.*$+zookeeper.connect=${ZOOKEEPER_CONNECT}+" config/cruisecontrol.properties\nexec ./kafka-cruise-control-start.sh "$@"' > run.sh; chmod a+x run.sh
+ENTRYPOINT [ "/opt/cruise-control/run.sh" ]
+CMD [ "config/cruisecontrol.properties" ]