Here is my docker file
RUN apt-get install -y --no-install-recommends software-properties-common
RUN add-apt-repository -y ppa:openjdk-r/ppa
RUN apt-get update
RUN apt-get install -y openjdk-8-jdk
RUN apt-get install -y openjdk-8-jre
RUN update-alternatives --config java
RUN update-alternatives --config javac
when I log into the container using sudo docker run -t -i dockerfile
and type java or javac it works. I can see it has been installed successfully however when i run it with the file below it says "java command not found"?
RUN apt-get install -y --no-install-recommends software-properties-common
RUN add-apt-repository -y ppa:openjdk-r/ppa
RUN apt-get update
RUN apt-get install -y openjdk-8-jdk
RUN apt-get install -y openjdk-8-jre
RUN update-alternatives --config java
RUN update-alternatives --config javac
ENTRYPOINT ["java" "-jar", "/home/project/hello.jar"]
CMD [""]
sudo docker run -t -i dockerfile
java command not found
?