Skip to content

Instantly share code, notes, and snippets.

@pingrunhuang
Created June 11, 2018 02:59
Show Gist options
  • Save pingrunhuang/76fa558e5c857fc32e97c2dbd929e29f to your computer and use it in GitHub Desktop.
Save pingrunhuang/76fa558e5c857fc32e97c2dbd929e29f to your computer and use it in GitHub Desktop.

Revisions

  1. pingrunhuang created this gist Jun 11, 2018.
    7 changes: 7 additions & 0 deletions install java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    RUN curl -LO 'http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-x64.rpm' -H 'Cookie: oraclelicense=accept-securebackup-cookie'
    RUN rpm -i jdk-7u71-linux-x64.rpm
    RUN rm jdk-7u71-linux-x64.rpm

    ENV JAVA_HOME /usr/java/default
    ENV PATH $PATH:$JAVA_HOME/bin
    RUN rm /usr/bin/java && ln -s $JAVA_HOME/bin/java /usr/bin/java