forked from nodejs/build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrhel8_arm_cross.Dockerfile.j2
75 lines (60 loc) · 2.95 KB
/
rhel8_arm_cross.Dockerfile.j2
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
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM registry.access.redhat.com/ubi8:latest
ENV LC_ALL C
ENV USER {{ server_user }}
ENV JOBS {{ server_jobs | default(ansible_processor_vcpus) }}
ENV SHELL /bin/bash
ENV PATH /usr/lib64/ccache:/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV NODE_COMMON_PIPE /home/{{ server_user }}/test.pipe
ENV NODE_TEST_DIR /home/{{ server_user }}/tmp
ENV OSTYPE linux-gnu
ENV OSVARIANT docker
ENV DESTCPU {{ arch }}
ENV ARCH {{ arch }}
# ccache is not in the default repositories so get it from EPEL 8.
RUN dnf install --disableplugin=subscription-manager -y \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \
&& dnf update --disableplugin=subscription-manager -y \
&& dnf install --disableplugin=subscription-manager -y \
ccache \
gcc-c++ \
gcc-toolset-12 \
git \
glibc-devel.i686 \
java-17-openjdk-headless \
libatomic.i686 \
libstdc++-devel \
libstdc++-devel.i686 \
make \
python3.8 \
procps-ng \
xz \
&& dnf --disableplugin=subscription-manager clean all
RUN dnf install --disableplugin=subscription-manager -y \
http://vault.centos.org/8-stream/AppStream/x86_64/os/Packages/gcc-toolset-10-binutils-2.35-11.el8.x86_64.rpm \
http://vault.centos.org/8-stream/AppStream/x86_64/os/Packages/gcc-toolset-10-gcc-10.3.1-1.2.el8_5.x86_64.rpm \
http://vault.centos.org/8-stream/AppStream/x86_64/os/Packages/gcc-toolset-10-gcc-c++-10.3.1-1.2.el8_5.x86_64.rpm \
http://vault.centos.org/8-stream/AppStream/x86_64/os/Packages/gcc-toolset-10-libstdc++-devel-10.3.1-1.2.el8_5.i686.rpm \
http://vault.centos.org/8-stream/AppStream/x86_64/os/Packages/gcc-toolset-10-libstdc++-devel-10.3.1-1.2.el8_5.x86_64.rpm \
http://vault.centos.org/8-stream/AppStream/x86_64/os/Packages/gcc-toolset-10-runtime-10.1-0.el8.x86_64.rpm
RUN groupadd -r -g {{ server_user_gid.stdout_lines[0] }} {{ server_user }} \
&& adduser -r -m -d /home/{{ server_user }}/ \
-g {{ server_user_gid.stdout_lines[0] }} \
-u {{ server_user_uid.stdout_lines[0] }} {{ server_user }}
# Relax crypto policies to allow Node.js tests to pass
RUN update-crypto-policies --set LEGACY
VOLUME /home/{{ server_user }}/ /home/{{ server_user }}/.ccache
ENV PYTHON /usr/bin/python3
RUN pip3 install tap2junit=={{ tap2junit_version }}
RUN git clone --depth=1 https://github.com/rvagg/rpi-newer-crosstools.git /opt/raspberrypi/rpi-newer-crosstools
COPY cc-selector.sh /opt/raspberrypi/cc-selector.sh
RUN chmod 755 /opt/raspberrypi/cc-selector.sh
USER {{ server_user }}:{{ server_user }}
ENV CCACHE_TEMPDIR /home/{{ server_user }}/.ccache/{{ item.name }}
WORKDIR /home/{{ server_user }}
CMD cd /home/{{ server_user }} \
&& curl https://ci.nodejs.org/jnlpJars/agent.jar -O \
&& java -Xmx{{ server_ram|default('128m') }} \
-jar /home/{{ server_user }}/agent.jar \
-url {{ jenkins_url }} \
-name {{ item.name }} \
-secret {{ item.secret }}