Use temurin Java docker images instead of deprecated ones (#12334) (#12421)

Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
This commit is contained in:
Kerwin 2022-10-18 18:51:14 +08:00 committed by GitHub
parent d2e56af838
commit 2402b8a6ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 21 additions and 37 deletions

View File

@ -15,10 +15,10 @@
# limitations under the License.
#
FROM openjdk:8-jre-slim-bullseye
FROM eclipse-temurin:8-jre
RUN apt update ; \
apt install -y curl wget default-mysql-client sudo openssh-server netcat-traditional ;
apt install -y wget default-mysql-client sudo openssh-server netcat-traditional ;
COPY ./apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root
RUN tar -zxvf /root/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz -C ~

View File

@ -16,7 +16,7 @@
#
# JAVA_HOME, will use it to start DolphinScheduler server
export JAVA_HOME=${JAVA_HOME:-/usr/local/openjdk-8}
export JAVA_HOME=${JAVA_HOME:-/opt/java/openjdk}
# Database related configuration, set database type, username and password
export DATABASE=${DATABASE:-mysql}

View File

@ -15,10 +15,10 @@
# limitations under the License.
#
FROM openjdk:8-jre-slim-bullseye
FROM eclipse-temurin:8-jre
RUN apt update ; \
apt install -y curl wget sudo openssh-server netcat-traditional ;
apt install -y wget sudo openssh-server netcat-traditional ;
COPY ./apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root
RUN tar -zxvf /root/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz -C ~

View File

@ -16,7 +16,7 @@
#
# JAVA_HOME, will use it to start DolphinScheduler server
export JAVA_HOME=${JAVA_HOME:-/usr/local/openjdk-8}
export JAVA_HOME=${JAVA_HOME:-/opt/java/openjdk}
# Database related configuration, set database type, username and password
export DATABASE=${DATABASE:-postgresql}

View File

@ -15,16 +15,12 @@
# limitations under the License.
#
FROM openjdk:8-jre-slim-bullseye
FROM eclipse-temurin:8-jre
ENV DOCKER true
ENV TZ Asia/Shanghai
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler
RUN apt update ; \
apt install -y curl ; \
rm -rf /var/lib/apt/lists/*
WORKDIR $DOLPHINSCHEDULER_HOME
ADD ./target/alert-server $DOLPHINSCHEDULER_HOME

View File

@ -27,6 +27,6 @@ if [[ "$DOCKER" == "true" ]]; then
JAVA_OPTS="${JAVA_OPTS} -XX:-UseContainerSupport"
fi
java $JAVA_OPTS \
$JAVA_HOME/bin/java $JAVA_OPTS \
-cp "$DOLPHINSCHEDULER_HOME/conf":"$DOLPHINSCHEDULER_HOME/libs/*" \
org.apache.dolphinscheduler.api.ApiApplicationServer

View File

@ -15,16 +15,12 @@
# limitations under the License.
#
FROM openjdk:8-jre-slim-bullseye
FROM eclipse-temurin:8-jre
ENV DOCKER true
ENV TZ Asia/Shanghai
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler
RUN apt update ; \
apt install -y curl ; \
rm -rf /var/lib/apt/lists/*
WORKDIR $DOLPHINSCHEDULER_HOME
ADD ./target/api-server $DOLPHINSCHEDULER_HOME

View File

@ -27,6 +27,6 @@ if [[ "$DOCKER" == "true" ]]; then
JAVA_OPTS="${JAVA_OPTS} -XX:-UseContainerSupport"
fi
java $JAVA_OPTS \
$JAVA_HOME/bin/java $JAVA_OPTS \
-cp "$DOLPHINSCHEDULER_HOME/conf":"$DOLPHINSCHEDULER_HOME/libs/*" \
org.apache.dolphinscheduler.server.master.MasterServer

View File

@ -15,16 +15,12 @@
# limitations under the License.
#
FROM openjdk:8-jre-slim-bullseye
FROM eclipse-temurin:8-jre
ENV DOCKER true
ENV TZ Asia/Shanghai
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler
RUN apt update ; \
apt install -y curl ; \
rm -rf /var/lib/apt/lists/*
WORKDIR $DOLPHINSCHEDULER_HOME
ADD ./target/master-server $DOLPHINSCHEDULER_HOME

View File

@ -35,6 +35,6 @@ for d in $DOLPHINSCHEDULER_HOME/libs/*; do
done
done
java $JAVA_OPTS \
$JAVA_HOME/bin/java $JAVA_OPTS \
-cp "$DOLPHINSCHEDULER_HOME/conf":"$CP" \
org.apache.dolphinscheduler.StandaloneServer

View File

@ -38,6 +38,6 @@ for d in alert-server api-server master-server worker-server; do
done
done
java $JAVA_OPTS \
$JAVA_HOME/bin/java $JAVA_OPTS \
-cp "$DOLPHINSCHEDULER_HOME/conf":"$CP" \
org.apache.dolphinscheduler.StandaloneServer

View File

@ -15,14 +15,14 @@
# limitations under the License.
#
FROM openjdk:8-jre-slim-bullseye
FROM eclipse-temurin:8-jre
ENV DOCKER true
ENV TZ Asia/Shanghai
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler
RUN apt update ; \
apt install -y curl sudo ; \
apt install -y sudo ; \
rm -rf /var/lib/apt/lists/*
WORKDIR $DOLPHINSCHEDULER_HOME

View File

@ -25,7 +25,7 @@ fi
JAVA_OPTS=${JAVA_OPTS:-"-server -Duser.timezone=${SPRING_JACKSON_TIME_ZONE} -Xms1g -Xmx1g -Xmn512m -XX:+PrintGCDetails -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof"}
java $JAVA_OPTS \
$JAVA_HOME/bin/java $JAVA_OPTS \
-cp "$DOLPHINSCHEDULER_HOME/tools/conf":"$DOLPHINSCHEDULER_HOME/tools/libs/*":"$DOLPHINSCHEDULER_HOME/tools/sql" \
-Dspring.profiles.active=upgrade,${DATABASE} \
org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler

View File

@ -15,16 +15,12 @@
# limitations under the License.
#
FROM openjdk:8-jre-slim-bullseye
FROM eclipse-temurin:8-jre
ENV DOCKER true
ENV TZ Asia/Shanghai
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler
RUN apt update ; \
apt install -y curl ; \
rm -rf /var/lib/apt/lists/*
WORKDIR $DOLPHINSCHEDULER_HOME
# see doc: https://dolphinscheduler.apache.org/en-us/docs/dev/user_doc/guide/upgrade.html

View File

@ -30,6 +30,6 @@ if [[ "$DOCKER" == "true" ]]; then
JAVA_OPTS="${JAVA_OPTS} -XX:-UseContainerSupport"
fi
java $JAVA_OPTS \
$JAVA_HOME/bin/java $JAVA_OPTS \
-cp "$DOLPHINSCHEDULER_HOME/conf":"$DOLPHINSCHEDULER_HOME/libs/*" \
org.apache.dolphinscheduler.server.worker.WorkerServer

View File

@ -15,14 +15,14 @@
# limitations under the License.
#
FROM openjdk:8-jre-slim-bullseye
FROM eclipse-temurin:8-jre
ENV DOCKER true
ENV TZ Asia/Shanghai
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler
RUN apt update ; \
apt install -y curl sudo ; \
apt install -y sudo ; \
rm -rf /var/lib/apt/lists/*
WORKDIR $DOLPHINSCHEDULER_HOME

View File

@ -16,7 +16,7 @@
#
# JAVA_HOME, will use it to start DolphinScheduler server
export JAVA_HOME=${JAVA_HOME:-/opt/soft/java}
export JAVA_HOME=${JAVA_HOME:-/opt/java/openjdk}
# Database related configuration, set database type, username and password
export DATABASE=${DATABASE:-postgresql}