Skip to content

Commit

Permalink
Merge pull request #2305 from telefonicaid/task/force_jdk_11_debian_12
Browse files Browse the repository at this point in the history
fix to openjdk-11 instead of openjdk-17
  • Loading branch information
fgalan authored Sep 18, 2023
2 parents 7d33f51 + 7bbd77f commit e84e3ac
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docker/cygnus-ngsi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ ENV FLUME_HOME "/opt/apache-flume"
ENV FLUME_TGZ "apache-flume-${FLUME_VER}-bin.tar.gz"
ENV FLUME_URL "https://archive.apache.org/dist/flume/${FLUME_VER}/${FLUME_TGZ}"

ENV JAVA_VERSION "1.17.0"
ENV JAVA_VERSION "1.11.0"

COPY / ${CYGNUS_HOME}

Expand All @@ -269,7 +269,15 @@ RUN \
apt-get -y update && \
apt-get -y upgrade && \
# Install dependencies
apt-get -y install openjdk-17-jdk curl git python3 maven && \
# Debian 12 comes with Java 17 but we have found some problems with it (see https://github.com/telefonicaid/fiware-cygnus/issues/2297)
# so we "downgrade" to Java 11
apt-get -y install curl git python3 && \
curl -s --insecure -L 'http://security.debian.org/debian-security/pool/updates/main/o/openjdk-11/openjdk-11-jdk_11.0.20+8-1~deb11u1_amd64.deb' > openjdk-11-jdk_11.0.20+8-1~deb11u1_amd64.deb && \
curl -s --insecure -L 'http://security.debian.org/debian-security/pool/updates/main/o/openjdk-11/openjdk-11-jre_11.0.20+8-1~deb11u1_amd64.deb' > openjdk-11-jre_11.0.20+8-1~deb11u1_amd64.deb && \
curl -s --insecure -L 'http://security.debian.org/debian-security/pool/updates/main/o/openjdk-11/openjdk-11-jdk-headless_11.0.20+8-1~deb11u1_amd64.deb' > openjdk-11-jdk-headless_11.0.20+8-1~deb11u1_amd64.deb && \
curl -s --insecure -L 'http://security.debian.org/debian-security/pool/updates/main/o/openjdk-11/openjdk-11-jre-headless_11.0.20+8-1~deb11u1_amd64.deb' > openjdk-11-jre-headless_11.0.20+8-1~deb11u1_amd64.deb && \
apt-get -y install ./openjdk-11-jre-headless_11.0.20+8-1~deb11u1_amd64.deb ./openjdk-11-jre_11.0.20+8-1~deb11u1_amd64.deb ./openjdk-11-jdk-headless_11.0.20+8-1~deb11u1_amd64.deb ./openjdk-11-jdk_11.0.20+8-1~deb11u1_amd64.deb && \
apt-get -y install maven && \
# Add Cygnus user
adduser ${CYGNUS_USER} && \
export JAVA_HOME=/usr/lib/jvm/java-${JAVA_VERSION}-openjdk-amd64 && \
Expand Down

0 comments on commit e84e3ac

Please sign in to comment.