Skip to content

Commit

Permalink
ElektraInitiative#3713 reintroduced setting JAVA_HOME and CASSPATH in…
Browse files Browse the repository at this point in the history
… fedora Dockerfiles to prevent error: "Could not find tools.jar. Please check that /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-0.fc32.x86_64/jre contains a valid JDK installation."
  • Loading branch information
Michael Tucek authored and a-kraschitzer committed Apr 14, 2021
1 parent 0b2cda3 commit 238bd89
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 0 additions & 2 deletions scripts/docker/cirrus/fedora/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,5 @@ RUN mkdir -p ${GTEST_ROOT} \
RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-6.8.3-bin.zip && unzip gradle-6.8.3-bin.zip && rm gradle-6.8.3-bin.zip && mv gradle-6.8.3 /opt/gradle
ENV PATH "${PATH}:/opt/gradle/bin"
RUN echo "export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which javac)))))" >> /etc/profile.d/java.sh
RUN echo "export PATH=$PATH:$JAVA_HOME/bin" >> /etc/profile.d/java.sh
RUN echo "CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar" >> /etc/profile.d/java.sh
RUN source /etc/profile.d/java.sh

3 changes: 3 additions & 0 deletions scripts/docker/fedora/31/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ RUN useradd \
# download and install gradle
RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-6.8.3-bin.zip && unzip gradle-6.8.3-bin.zip && rm gradle-6.8.3-bin.zip && mv gradle-6.8.3 /opt/gradle
ENV PATH "${PATH}:/opt/gradle/bin"
RUN echo "export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which javac)))))" >> /etc/profile.d/java.sh
RUN echo "CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar" >> /etc/profile.d/java.sh
RUN source /etc/profile.d/java.sh

USER ${JENKINS_USERID}

Expand Down
3 changes: 3 additions & 0 deletions scripts/docker/fedora/32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ RUN useradd \
# download and install gradle
RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-6.8.3-bin.zip && unzip gradle-6.8.3-bin.zip && rm gradle-6.8.3-bin.zip && mv gradle-6.8.3 /opt/gradle
ENV PATH "${PATH}:/opt/gradle/bin"
RUN echo "export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which javac)))))" >> /etc/profile.d/java.sh
RUN echo "CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar" >> /etc/profile.d/java.sh
RUN source /etc/profile.d/java.sh

USER ${JENKINS_USERID}

Expand Down
3 changes: 3 additions & 0 deletions scripts/docker/fedora/33/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ RUN useradd \
# download and install gradle
RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-6.8.3-bin.zip && unzip gradle-6.8.3-bin.zip && rm gradle-6.8.3-bin.zip && mv gradle-6.8.3 /opt/gradle
ENV PATH "${PATH}:/opt/gradle/bin"
RUN echo "export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which javac)))))" >> /etc/profile.d/java.sh
RUN echo "CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar" >> /etc/profile.d/java.sh
RUN source /etc/profile.d/java.sh

USER ${JENKINS_USERID}

Expand Down

0 comments on commit 238bd89

Please sign in to comment.