-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.opensuse
56 lines (52 loc) · 3.68 KB
/
Dockerfile.opensuse
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM opensuse/leap:15.2 AS jdkbuilder
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.opensuse --target=jdkbuilder --tag=aashipov/openjdk-build:opensusejdkbuilder && docker push aashipov/openjdk-build:opensusejdkbuilder
ARG DUMMY_USER=dummy
ARG UID_GID=10001
ENV JAVA_HOME="/opt/jvm"
ENV PATH="${JAVA_HOME}/bin:${PATH}"
RUN zypper --non-interactive dup && \
zypper --non-interactive install zip unzip gzip git make gcc gcc-c++ clang \
libffi-devel libpulse-devel alsa-lib-devel autoconf automake bc binutils \
cups-devel fontconfig-devel freetype2-devel \
libX11-devel libXi-devel libXinerama-devel libXrandr-devel libXrender-devel libXt-devel libXtst-devel libjpeg-devel libpng-devel libtool libxslt \
pkgconfig xorg-x11-proto-devel xprop \
which giflib-devel curl wget && \
zypper --non-interactive clean && \
groupadd -g ${UID_GID} ${DUMMY_USER} && useradd -m -u ${UID_GID} -d /${DUMMY_USER}/ -g ${DUMMY_USER} ${DUMMY_USER} && \
mkdir -p ${JAVA_HOME}/
FROM aashipov/openjdk-build:opensusejdkbuilder AS jdk8u
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.opensuse --target=jdk8u --tag=aashipov/openjdk-build:opensusejdk8u && docker push aashipov/openjdk-build:opensusejdk8u
RUN curl -L -o /tmp/openjdk.tar.gz https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u302-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u302b08.tar.gz && \
tar -xzf /tmp/openjdk.tar.gz -C ${JAVA_HOME}/ --strip-components=1 && \
find "${JAVA_HOME}" -type f -name '*.debuginfo' -exec rm {} \; && \
find "${JAVA_HOME}" -type f -name '*.diz' -exec rm {} \; && \
rm -rf ${JAVA_HOME}/demo/ ${JAVA_HOME}/lib/src.zip ${JAVA_HOME}/man/ && \
java -version && \
rm -rf /tmp/openjdk.tar.gz
FROM aashipov/openjdk-build:opensusejdkbuilder AS jdk11u
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.opensuse --target=jdk11u --tag=aashipov/openjdk-build:opensusejdk11u && docker push aashipov/openjdk-build:opensusejdk11u
RUN curl -L -o /tmp/openjdk.tar.gz https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz && \
tar -xzf /tmp/openjdk.tar.gz -C ${JAVA_HOME}/ --strip-components=1 && \
find "${JAVA_HOME}" -type f -name '*.debuginfo' -exec rm {} \; && \
find "${JAVA_HOME}" -type f -name '*.diz' -exec rm {} \; && \
rm -rf ${JAVA_HOME}/demo/ ${JAVA_HOME}/lib/src.zip ${JAVA_HOME}/man/ && \
java -version && \
rm -rf /tmp/openjdk.tar.gz
FROM aashipov/openjdk-build:opensusejdkbuilder AS jdk17u
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.opensuse --target=jdk17u --tag=aashipov/openjdk-build:opensusejdk17u && docker push aashipov/openjdk-build:opensusejdk17u
RUN curl -L -o /tmp/openjdk.tar.gz https://download.java.net/java/GA/jdk17/0d483333a00540d886896bac774ff48b/35/GPL/openjdk-17_linux-x64_bin.tar.gz && \
tar -xzf /tmp/openjdk.tar.gz -C ${JAVA_HOME}/ --strip-components=1 && \
find "${JAVA_HOME}" -type f -name '*.debuginfo' -exec rm {} \; && \
find "${JAVA_HOME}" -type f -name '*.diz' -exec rm {} \; && \
rm -rf ${JAVA_HOME}/demo/ ${JAVA_HOME}/lib/src.zip ${JAVA_HOME}/man/ && \
java -version && \
rm -rf /tmp/openjdk.tar.gz
FROM aashipov/openjdk-build:opensusejdkbuilder AS jdk21u
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.opensuse --target=jdk21u --tag=aashipov/openjdk-build:opensusejdk21u && docker push aashipov/openjdk-build:opensusejdk21u
RUN curl -L -o /tmp/openjdk.tar.gz https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-x64_bin.tar.gz && \
tar -xzf /tmp/openjdk.tar.gz -C ${JAVA_HOME}/ --strip-components=1 && \
find "${JAVA_HOME}" -type f -name '*.debuginfo' -exec rm {} \; && \
find "${JAVA_HOME}" -type f -name '*.diz' -exec rm {} \; && \
rm -rf ${JAVA_HOME}/demo/ ${JAVA_HOME}/lib/src.zip ${JAVA_HOME}/man/ && \
java -version && \
rm -rf /tmp/openjdk.tar.gz