forked from adoptium/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.CentOS7
29 lines (21 loc) · 987 Bytes
/
Dockerfile.CentOS7
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
FROM centos:7
ARG user=jenkins
RUN yum -y update; yum -y install epel-release
RUN yum -y install ansible sudo; yum clean all
COPY . /ansible
RUN echo "localhost ansible_connection=local" > /ansible/hosts
RUN set -eux; \
cd /ansible; \
ansible-playbook -i hosts ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml --skip-tags="debug,hosts_file,hostname,adoptopenjdk,jenkins,nagios,superuser,docker,swap_file,crontab,nvidia_cuda_toolkit"
RUN rm -rf /ansible; yum remove ansible; yum clean all
RUN groupadd -g 1000 ${user}
RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user}
ENV \
JDK7_BOOT_DIR="/usr/lib/jvm/java-1.7.0-openjdk" \
JDK8_BOOT_DIR="/usr/lib/jvm/java-1.8.0-openjdk" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"