The previous talk of using wget to download JDK installation files from Oracle uses cookie spoofing to bypass authentication to use Dockerfile to install Oracle versions of the JDK in Ubuntu.
However, the path is to use Apt-get to install the Oracle JDK, and now update a dockerfile configuration that uses Apt-get to install the Oracle JDK:
1#VERSION 0.0.12 #默认ubuntu Server version3 From Ubuntu4 # Signature5Maintainer Linxiong "[email protected]"6 7 #安装jdk78RUN sed ' s/main$/main universe/'-i/etc/apt/sources.list9RUN apt-get update && apt-get install-y Software-properties-common python-software-PropertiesTenRUN add-apt-repository ppa:webupd8team/java-y One ARUN apt-Get update -RUN echo oracle-java7-installer Shared/accepted-oracle-license-v1-1 Select True | /usr/bin/debconf-set-selections - theRUN Apt-get install-y Oracle-java7-installer
This allows the Oracle JDK to be installed with Apt-get!!
"Docker" Dockerfile using Apt-get to install JDK