How to define OpenJDK 8 in CentOS based Dockerfile?
When JDK for development is installed, then JAVA_HOME should point to JDK instead of JRE.
RUN yum install -y \
java-1.8.0-openjdk \
java-1.8.0-openjdk-devel
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk/
Seems to be as easy as this:
FROM centos
RUN yum install -y \
java-1.8.0-openjdk \
java-1.8.0-openjdk-devel
ENV JAVA_HOME /etc/alternatives/jre
.
.