I tried install WildFly 10 on Oracle JDK 10 on CentOS 7 and WildFly cannot start becase it throw a no such file or directory error /usr/java/jdk10.0.2/java/bin on line 317 in standalone.sh
The java/bin is appended by WildFly on line 130: JAVA="$JAVA_HOME/bin/java"
It worked on Java 8. What's the best way to solve this?
My Dockerfile looks like this:
FROM centos:7
RUN curl --insecure --junk-session-cookies --location --remote-name --silent --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.rpm && \
yum localinstall -y -q jdk-10.0.2_linux-x64_bin.rpm && \
yum install -y unzip && \
yum install -y dejavu-serif-fonts && \
rm jdk-10.0.2_linux-x64_bin.rpm && \
yum clean all && \
localedef --quiet -c -i pl_PL -f UTF-8 pl_PL.UTF-8; exit 0
ENV JAVA_HOME=/usr/java/jdk10.0.2 \
LANG=pl_PL.UTF-8 \
LANGUAGE=pl_PL:pl \
LC_ALL=pl_PL.UTF-8 \
VERSION=14.0.0.Final \
INSTALL_DIR=/opt \
WILDFLY_HOME=/opt/wildfly-14.0.0.Final
RUN curl --silent -O https://download.jboss.org/wildfly/${VERSION}/wildfly-${VERSION}.zip \
&& unzip -q wildfly-${VERSION}.zip -d ${INSTALL_DIR} \
&& rm wildfly-${VERSION}.zip \
&& chmod a+x ${WILDFLY_HOME}/bin/standalone.sh \
&& chmod -R a+rw ${INSTALL_DIR}
COPY docker/modules /opt/wildfly-14.0.0.Final/modules/
COPY docker/standalone /opt/wildfly-14.0.0.Final/standalone/
ENTRYPOINT ${WILDFLY_HOME}/bin/standalone.sh -b=0.0.0.0
EXPOSE 8080
CMD ["bash"]
Did you try setting JAVA_HOME forcefully just before your ENTRYPOINT to standalone.sh in Dockerfile ?