forked from adoptium/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.RHEL7
36 lines (27 loc) · 1.79 KB
/
Dockerfile.RHEL7
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
FROM registry.access.redhat.com/rhel7
RUN yum-config-manager --enable rhel-7-for-system-z-optional-rpms
# ^^ Optional repo needed for Xvfb
ARG git_sha
ARG user=jenkins
RUN yum -y update; yum install -y sudo
RUN yum --enablerepo=rhel-7-server-ansible-2-for-system-z-rpms install -y ansible
RUN yum clean all
COPY . /ansible
COPY devkit /usr/local/devkit
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,locales,ntp_time"
# ^^^ locales ommitted because locale-gen isn't present on RHEL and the ones we install aren't there by default
RUN rm -rf /ansible; yum remove ansible; yum clean all
RUN groupadd -g 1003 ${user}
RUN useradd -c "Jenkins user" -d /home/${user} -u 1002 -g 1003 -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" \
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"
# While this does bloat the image it is required for building the
# devkit, and the process for that runs as non-root ...
# Disabled for now as we're going to copy from /usr/local/devkit on the host
RUN yum clean all
RUN yum reinstall --downloadonly glibc glibc-headers glibc-devel cups-libs cups-devel libX11 libX11-devel xorg-x11-proto-devel alsa-lib alsa-lib-devel libXext libXext-devel libXtst libXtst-devel libXrender libXrender-devel libXrandr libXrandr-devel freetype freetype-devel libXt libXt-devel libSM libSM-devel libICE libICE-devel libXi libXi-devel libXdmcp libXdmcp-devel libXau libXau-devel libgcc libxcrypt zlib zlib-devel libffi libffi-devel fontconfig fontconfig-devel kernel-headers