aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhekeguang <hekeguang@chinamobile.com>2020-09-14 16:20:06 +0800
committerhekeguang <hekeguang@chinamobile.com>2020-09-14 16:20:16 +0800
commit392d3624fb54c36b738ace75f263d9089b5c3d97 (patch)
tree6487b85d51659c413cd98c0228b2d40858931a70
parenta64a53cfc8d22f341c7892dd288075d0b5eaf8e6 (diff)
Fix bug about Java11 Upgrade!
Issue-ID: USECASEUI-484 Change-Id: I5949d699871ea0d9e0448d7650d7bda2561746f4 Signed-off-by: hekeguang <hekeguang@chinamobile.com>
-rw-r--r--standalone/src/main/assembly/Dockerfile13
1 files changed, 8 insertions, 5 deletions
diff --git a/standalone/src/main/assembly/Dockerfile b/standalone/src/main/assembly/Dockerfile
index b8b0f75e..1f674362 100644
--- a/standalone/src/main/assembly/Dockerfile
+++ b/standalone/src/main/assembly/Dockerfile
@@ -17,9 +17,12 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
# Update the Ubuntu and install tools
-add-apt-repository ppa:openjdk-r/ppa \
RUN apt-get update && \
- apt-get install -y openjdk-11-jdk && \
+ apt-get install -y python-software-properties && \
+ apt-get install -y software-properties-common && \
+ add-apt-repository -y ppa:openjdk-r/ppa && \
+ apt-get update && \
+ apt-get install -y openjdk-11-jdk && \
apt-get install -y gcc && \
apt-get install -y curl && \
apt-get install -y vim && \
@@ -39,9 +42,9 @@ VOLUME ["${PG_HOME}", "${PG_VAR_LIB}", "${PG_LOGDIR}"]
# CMD ["${PG_USR_LIB}/${PG_VERSION}/bin/postgres", "-D", "${PG_VAR_LIB}/${PG_VERSION}/main", "-c", "config_file=${PG_HOME}/${PG_VERSION}/main/postgresql.conf"]
#Configure Java SDK
-RUN sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/java-11-openjdk-amd64/jre/lib/security/java.security
-ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
-ENV PATH $PATH:/usr/lib/jvm/java-11-openjdk-amd64/jre/bin:/usr/lib/jvm/java-11-openjdk-amd64/bin
+RUN sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/java-11-*/conf/security/java.security
+ENV JAVA_HOME /usr/lib/jvm/java-11-*
+ENV PATH $PATH:/usr/lib/jvm/java-11-*/jre/bin
ENV CLASSPATH .:${JAVA_HOME}/lib:${JRE_HOME}/lib
ENV JRE_HOME ${JAVA_HOME}/jre