-
-
Notifications
You must be signed in to change notification settings - Fork 102
/
Dockerfile.CentOS6
35 lines (27 loc) · 1.44 KB
/
Dockerfile.CentOS6
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
FROM centos:6.9
ARG git_sha
ARG user=jenkins
# Install Python 3
RUN sed -i -e 's!mirrorlist!#mirrorlist!g' /etc/yum.repos.d/CentOS-Base.repo; \
sed -i -e 's!#baseurl=http://mirror.centos.org/centos/\$releasever!baseurl=https://vault.centos.org/6.10/!g' /etc/yum.repos.d/CentOS-Base.repo; \
yum -y update; yum clean all; \
yum -y install gcc openssl-devel bzip2-devel sqlite-devel sudo wget python3 epel-release; \
yum -y install ansible
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 -e "git_sha=$git_sha" --skip-tags="debug,hosts_file,hostname,adoptopenjdk,jenkins,nagios,superuser,docker,swap_file,crontab,nvidia_cuda_toolkit"; \
ansible-playbook -i hosts ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml -e "git_sha=$git_sha" --tags="riscv"
RUN rm -rf /ansible; yum remove -y 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.x86_64" \
JDK8_BOOT_DIR="/usr/lib/jvm/java-1.8.0-openjdk.x86_64" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk14" \
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk.x86_64"