You might not want to use this in production as it masks the acceptance of the Oracle EULA, which may be prohibited for redistribution.
-
-
Save gkhays/55b5708f3f0c6c8358bb to your computer and use it in GitHub Desktop.
Installing Java from Oracle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download and unarchive Java | |
RUN mkdir /opt && curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie"\ | |
http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz \ | |
| tar -xzf - -C /opt &&\ | |
ln -s /opt/jdk1.7.0_79 /opt/jdk &&\ | |
rm -rf /opt/jdk/*src.zip \ | |
/opt/jdk/lib/missioncontrol \ | |
/opt/jdk/lib/visualvm \ | |
/opt/jdk/lib/*javafx* \ | |
/opt/jdk/jre/lib/plugin.jar \ | |
/opt/jdk/jre/lib/ext/jfxrt.jar \ | |
/opt/jdk/jre/bin/javaws \ | |
/opt/jdk/jre/lib/javaws.jar \ | |
/opt/jdk/jre/lib/desktop \ | |
/opt/jdk/jre/plugin \ | |
/opt/jdk/jre/lib/deploy* \ | |
/opt/jdk/jre/lib/*javafx* \ | |
/opt/jdk/jre/lib/*jfx* \ | |
/opt/jdk/jre/lib/amd64/libdecora_sse.so \ | |
/opt/jdk/jre/lib/amd64/libprism_*.so \ | |
/opt/jdk/jre/lib/amd64/libfxplugins.so \ | |
/opt/jdk/jre/lib/amd64/libglass.so \ | |
/opt/jdk/jre/lib/amd64/libgstreamer-lite.so \ | |
/opt/jdk/jre/lib/amd64/libjavafx*.so \ | |
/opt/jdk/jre/lib/amd64/libjfx*.so \ | |
&& addgroup -g 999 app && adduser -D -G app -s /bin/false -u 999 app \ | |
&& rm -rf /tmp/* \ | |
&& rm -rf /var/cache/apk/* \ | |
&& echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment