This repository has been archived by the owner on Aug 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
42 lines (38 loc) · 1.62 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM jeanblanchard/alpine-glibc
MAINTAINER Jean Blanchard <[email protected]>
# Java Version
ENV JAVA_VERSION_MAJOR 8
ENV JAVA_VERSION_MINOR 211
ENV JAVA_VERSION_BUILD 12
ENV JAVA_URL_ELEMENT 478a62b7d4e34b78b671c754eaaf38ab
ENV JAVA_PACKAGE jre
ENV JAVA_SHA256_SUM db3ba91c78b950269380d8f6872befed94176f619cefbcd7877e3624512e0218
# Download and unarchive Java
RUN apk add --update curl &&\
mkdir -p /opt &&\
curl -jkLH "Cookie: oraclelicense=accept-securebackup-cookie" -o java.tar.gz\
http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/${JAVA_URL_ELEMENT}/${JAVA_PACKAGE}-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz &&\
echo "$JAVA_SHA256_SUM java.tar.gz" | sha256sum -c - &&\
gunzip -c java.tar.gz | tar -xf - -C /opt && rm -f java.tar.gz &&\
ln -s /opt/jre1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} /opt/jre &&\
rm -rf /opt/jre/lib/plugin.jar \
/opt/jre/lib/ext/jfxrt.jar \
/opt/jre/bin/javaws \
/opt/jre/lib/javaws.jar \
/opt/jre/lib/desktop \
/opt/jre/plugin \
/opt/jre/lib/deploy* \
/opt/jre/lib/*javafx* \
/opt/jre/lib/*jfx* \
/opt/jre/lib/amd64/libdecora_sse.so \
/opt/jre/lib/amd64/libprism_*.so \
/opt/jre/lib/amd64/libfxplugins.so \
/opt/jre/lib/amd64/libglass.so \
/opt/jre/lib/amd64/libgstreamer-lite.so \
/opt/jre/lib/amd64/libjavafx*.so \
/opt/jre/lib/amd64/libjfx*.so &&\
apk del curl &&\
rm -rf /var/cache/apk/*
# Set environment
ENV JAVA_HOME /opt/jre
ENV PATH ${PATH}:${JAVA_HOME}/bin