-
Notifications
You must be signed in to change notification settings - Fork 166
/
Copy pathubuntu1604_sharedlibs.Dockerfile.j2
95 lines (76 loc) · 2.99 KB
/
ubuntu1604_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
FROM ubuntu:16.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 x64
ENV ARCH x64
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++ \
gcc \
git \
openjdk-8-jre-headless \
curl \
python-pip \
libfontconfig1
RUN pip 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 OPENSSL102DIR /opt/openssl-1.0.2n
RUN mkdir -p /tmp/openssl_1.0.2n && \
cd /tmp/openssl_1.0.2n && \
curl -sL https://github.com/openssl/openssl/archive/OpenSSL_1_0_2n.tar.gz | tar zxv --strip=1 && \
./Configure shared linux-x86_64 --prefix=$OPENSSL102DIR -fPIC && \
make -j 6 && \
make install && \
rm -rf /tmp/openssl_1.0.2n
ENV OPENSSL110DIR /opt/openssl-1.1.0g
RUN mkdir -p /tmp/openssl_1.1.0g && \
cd /tmp/openssl_1.1.0g && \
curl -sL https://github.com/openssl/openssl/archive/OpenSSL_1_1_0g.tar.gz | tar zxv --strip=1 && \
./config --prefix=$OPENSSL110DIR && \
make -j 6 && \
make install && \
rm -rf /tmp/openssl_1.1.0g
ENV OPENSSL111DIR /opt/openssl-1.1.1-pre1
RUN mkdir -p /tmp/openssl_1.1.1-pre1 && \
cd /tmp/openssl_1.1.1-pre1 && \
curl -sL https://github.com/openssl/openssl/archive/OpenSSL_1_1_1-pre1.tar.gz | tar zxv --strip=1 && \
./config --prefix=$OPENSSL111DIR && \
make -j 6 && \
make install && \
rm -rf /tmp/openssl_1.1.1-pre1
ENV FIPS20DIR /opt/openssl-fips_2.0.16
RUN FIPSDIR=$FIPS20DIR mkdir -p /tmp/openssl-fips_2.0.16 && \
cd /tmp/openssl-fips_2.0.16 && \
curl -sL https://openssl.org/source/openssl-fips-2.0.16.tar.gz | tar zxv --strip=1 && \
./config --prefix=$FIPS20DIR && \
make && \
make install && \
rm -rf /tmp/openssl-fips_2.0.16
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 }}