From 67bf0a357b95f3f97c77f7b552f85d6fdfbdda59 Mon Sep 17 00:00:00 2001 From: Chia-Ping Tsai Date: Wed, 13 Nov 2024 21:33:18 +0800 Subject: [PATCH] [DOCKER] Docker image requires lowercase naming ... --- docker/start_app.sh | 2 +- docker/start_broker.sh | 2 +- docker/start_worker.sh | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker/start_app.sh b/docker/start_app.sh index 8801cb3811..38944ab977 100755 --- a/docker/start_app.sh +++ b/docker/start_app.sh @@ -23,7 +23,7 @@ declare -r ACCOUNT=${ACCOUNT:-opensource4you} if [[ "$VERSION" == "main" ]]; then declare -r IMAGE_NAME="ghcr.io/${ACCOUNT,,}/astraea/app:latest" else - declare -r IMAGE_NAME="ghcr.io/${ACCOUNT,,}/astraea/app:$VERSION" + declare -r IMAGE_NAME="ghcr.io/${ACCOUNT,,}/astraea/app:${VERSION,,}" fi declare -r DOCKERFILE=$DOCKER_FOLDER/app.dockerfile declare -r JMX_PORT=${JMX_PORT:-"$(getRandomPort)"} diff --git a/docker/start_broker.sh b/docker/start_broker.sh index 20223e37a8..029f26beac 100755 --- a/docker/start_broker.sh +++ b/docker/start_broker.sh @@ -44,7 +44,7 @@ declare -r JMX_OPTS="-Dcom.sun.management.jmxremote \ -Djava.rmi.server.hostname=$ADDRESS" declare -r HEAP_OPTS="${HEAP_OPTS:-"-Xmx2G -Xms2G"}" declare -r BROKER_PROPERTIES="/tmp/server-${BROKER_PORT}.properties" -declare -r IMAGE_NAME="ghcr.io/${ACCOUNT,,}/astraea/broker:$KAFKA_VERSION" +declare -r IMAGE_NAME="ghcr.io/${ACCOUNT,,}/astraea/broker:${KAFKA_VERSION,,}" declare -r METADATA_VERSION=${METADATA_VERSION:-""} # cleanup the file if it is existent [[ -f "$BROKER_PROPERTIES" ]] && rm -f "$BROKER_PROPERTIES" diff --git a/docker/start_worker.sh b/docker/start_worker.sh index 2b19979e86..43330fe1b0 100755 --- a/docker/start_worker.sh +++ b/docker/start_worker.sh @@ -34,7 +34,7 @@ declare -r JMX_OPTS="-Dcom.sun.management.jmxremote \ declare -r HEAP_OPTS="${HEAP_OPTS:-"-Xmx2G -Xms2G"}" declare -r WORKER_PROPERTIES="/tmp/worker-${WORKER_PORT}.properties" declare -r WORKER_PLUGIN_PATH=${WORKER_PLUGIN_PATH:-/tmp/worker-plugins} -declare -r IMAGE_NAME="ghcr.io/${ACCOUNT,,}/astraea/worker:$VERSION" +declare -r IMAGE_NAME="ghcr.io/${ACCOUNT,,}/astraea/worker:${KAFKA_VERSION,,}" declare -r SCRIPT_LOCATION_IN_CONTAINER="./bin/connect-distributed.sh" # cleanup the file if it is existent [[ -f "$WORKER_PROPERTIES" ]] && rm -f "$WORKER_PROPERTIES" @@ -82,8 +82,8 @@ FROM ghcr.io/opensource4you/astraea/deps AS build # build kafka from source code RUN git clone --depth=1 ${kafka_repo} /tmp/kafka WORKDIR /tmp/kafka -RUN git fetch --depth=1 origin $VERSION -RUN git checkout $VERSION +RUN git fetch --depth=1 origin $KAFKA_VERSION +RUN git checkout $KAFKA_VERSION RUN ./gradlew clean releaseTarGz RUN mkdir /opt/kafka RUN tar -zxvf \$(find ./core/build/distributions/ -maxdepth 1 -type f \( -iname \"kafka*tgz\" ! -iname \"*sit*\" \)) -C /opt/kafka --strip-components=1 @@ -128,7 +128,7 @@ RUN apt-get update && apt-get install -y wget WORKDIR /tmp RUN wget $kafka_url RUN mkdir /opt/kafka -RUN tar -zxvf kafka_2.13-${VERSION}.tgz -C /opt/kafka --strip-components=1 +RUN tar -zxvf kafka_2.13-${version}.tgz -C /opt/kafka --strip-components=1 RUN git clone ${repo} /tmp/astraea WORKDIR /tmp/astraea RUN ./gradlew clean shadowJar