-
Notifications
You must be signed in to change notification settings - Fork 166
/
ubuntu1804_sharedlibs.Dockerfile.j2
107 lines (89 loc) · 3.3 KB
/
ubuntu1804_sharedlibs.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
FROM ubuntu:18.04
ENV LC_ALL C
ENV USER {{ server_user }}
ENV JOBS {{ server_jobs | default(ansible_processor_vcpus) }}
ENV SHELL /bin/bash
ENV HOME /home/{{ server_user }}
ENV PATH /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 }}
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install apt-utils -y && \
apt-get dist-upgrade -y && apt-get install -y \
ccache \
g++-6 \
gcc-6 \
g++-8 \
gcc-8 \
git \
openjdk-8-jre-headless \
pkg-config \
curl \
python-pip \
python3-pip \
libfontconfig1 \
libtool \
automake
RUN pip install tap2junit
RUN pip3 install tap2junit
RUN addgroup --gid {{ server_user_gid.stdout_lines[0] }} {{ server_user }}
RUN adduser --gid {{ server_user_gid.stdout_lines[0] }} --uid {{ server_user_uid.stdout_lines[0] }} --disabled-password --gecos {{ server_user }} {{ server_user }}
ENV ICU64DIR=/opt/icu-64 \
ICU65DIR=/opt/icu-65 \
ICU67DIR=/opt/icu-67 \
ICU68DIR=/opt/icu-68 \
ICU69DIR=/opt/icu-69
RUN for ICU_ENV in $(env | grep ICU..DIR); do \
ICU_PREFIX=$(echo $ICU_ENV | cut -d '=' -f 2) && \
ICU_VERSION=$(echo $ICU_PREFIX | cut -d '-' -f 2) && \
mkdir -p /tmp/icu-$ICU_VERSION && \
cd /tmp/icu-$ICU_VERSION && \
curl -sL "https://api.github.com/repos/unicode-org/icu/tarball/maint/maint-$ICU_VERSION" | tar zxv --strip=1 && \
cd icu4c/source && \
./runConfigureICU Linux --prefix=$ICU_PREFIX && \
make -j $JOBS && \
make install && \
rm -rf /tmp/icu-$ICU_VERSION; \
done
ENV OPENSSL111VER 1.1.1n
ENV OPENSSL111DIR /opt/openssl-$OPENSSL111VER
RUN mkdir -p /tmp/openssl_$OPENSSL111VER && \
cd /tmp/openssl_$OPENSSL111VER && \
curl -sL https://www.openssl.org/source/openssl-$OPENSSL111VER.tar.gz | tar zxv --strip=1 && \
./config --prefix=$OPENSSL111DIR && \
make -j 6 && \
make install && \
rm -rf /tmp/openssl_$OPENSSL111VER
ENV OPENSSL3VER 3.0.2+quic
ENV OPENSSL3DIR /opt/openssl-$OPENSSL3VER
# TODO(richardlau) remove OPENSSL300DIR when the CI has been updated to use OPENSSL3DIR
ENV OPENSSL300DIR $OPENSSL3DIR
RUN mkdir -p /tmp/openssl-$OPENSSL3VER && \
cd /tmp/openssl-$OPENSSL3VER && \
git clone https://github.com/quictls/openssl.git -b openssl-$OPENSSL3VER --depth 1 && \
cd openssl && \
./config --prefix=$OPENSSL3DIR && \
make -j 6 && \
make install && \
rm -rf /tmp/openssl-$OPENSSL3VER
ENV ZLIB12DIR /opt/zlib_1.2.11
RUN mkdir -p /tmp/zlib_1.2.11 && \
cd /tmp/zlib_1.2.11 && \
curl -sL https://zlib.net/zlib-1.2.11.tar.gz | tar zxv --strip=1 && \
./configure --prefix=$ZLIB12DIR && \
make -j 6 && \
make install && \
rm -rf /tmp/zlib_1.2.11
VOLUME /home/{{ server_user }}/ /home/{{ server_user }}/.ccache
USER iojs:iojs
ENV CCACHE_TEMPDIR /home/iojs/.ccache/{{ item.name }}
CMD cd /home/iojs \
&& curl https://ci.nodejs.org/jnlpJars/slave.jar -O \
&& java -Xmx{{ server_ram|default('128m') }} \
-jar /home/{{ server_user }}/slave.jar \
-jnlpUrl {{ jenkins_url }}/computer/{{ item.name }}/slave-agent.jnlp \
-secret {{ item.secret }}