-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.centos
62 lines (57 loc) · 3.91 KB
/
Dockerfile.centos
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
57
58
59
60
61
62
FROM centos:7 AS jdkbuilder
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.centos --target=jdkbuilder --tag=aashipov/openjdk-build:centosjdkbuilder && docker push aashipov/openjdk-build:centosjdkbuilder
ARG DUMMY_USER=dummy
ARG UID_GID=10001
ENV JAVA_HOME=/opt/jdk
ENV PATH=${JAVA_HOME}/bin:${PATH}
RUN yum upgrade -y && \
yum install -y centos-release-scl && \
yum install -y devtoolset-10 llvm-toolset-7 && \
yum install -y zip bzip2 unzip tar wget make autoconf automake libtool file which git \
libstdc++-static \
freetype-devel cups-devel libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel alsa-lib-devel fontconfig-devel && \
yum clean all && \
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:centosjdkbuilder AS jdk7u
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.centos --target=jdk7u --tag=aashipov/openjdk-build:centosjdk7u && docker push aashipov/openjdk-build:centosjdk7u
ENV ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.41.x86_64 JAVA_HOME=
RUN yum group install -y "Development Tools" && \
yum-builddep -y java-1.6.0-openjdk-devel && \
yum clean all
FROM aashipov/openjdk-build:centosjdkbuilder AS jdk8u
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.centos --target=jdk8u --tag=aashipov/openjdk-build:centosjdk8u && docker push aashipov/openjdk-build:centosjdk8u
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:centosjdkbuilder AS jdk11u
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.centos --target=jdk11u --tag=aashipov/openjdk-build:centosjdk11u && docker push aashipov/openjdk-build:centosjdk11u
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:centosjdkbuilder AS jdk17u
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.centos --target=jdk17u --tag=aashipov/openjdk-build:centosjdk17u && docker push aashipov/openjdk-build:centosjdk17u
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:centosjdkbuilder AS jdk21u
# DOCKER_BUILDKIT=1 docker build . --file=Dockerfile.centos --target=jdk21u --tag=aashipov/openjdk-build:centosjdk21u && docker push aashipov/openjdk-build:centosjdk21u
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