"Docker" Dockerfile using Apt-get to install JDK

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.