2019-10-07 14:08:34 +02:00
|
|
|
FROM debian:testing
|
|
|
|
|
|
|
|
RUN apt-get update ;\
|
2019-10-23 20:33:17 +02:00
|
|
|
apt-get install -y --no-install-recommends locales \
|
2019-11-13 18:13:14 +01:00
|
|
|
cmake ninja-build git ca-certificates clang-8 lld-8 ccache python3 build-essential \
|
2019-10-07 14:08:34 +02:00
|
|
|
clang-tidy-8 clang-format-8 \
|
2019-11-13 18:13:14 +01:00
|
|
|
python3-psutil arcanist zip wget \
|
2019-10-16 09:47:17 +02:00
|
|
|
openjdk-11-jdk \
|
2019-11-13 18:13:14 +01:00
|
|
|
python3-pip python3-setuptools \
|
|
|
|
swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync; \
|
2019-10-07 14:08:34 +02:00
|
|
|
apt-get clean
|
|
|
|
|
|
|
|
# required for openssh server
|
|
|
|
RUN mkdir -p /run/sshd
|
|
|
|
|
|
|
|
ARG user=jenkins
|
|
|
|
ARG group=jenkins
|
|
|
|
ARG uid=1000
|
|
|
|
ARG gid=1000
|
|
|
|
ARG AGENT_WORKDIR=/home/${user}/agent
|
|
|
|
|
|
|
|
RUN mkdir -p /scripts
|
2019-10-14 18:14:19 +02:00
|
|
|
|
|
|
|
# install the swarm client
|
|
|
|
RUN cd /scripts ;\
|
|
|
|
wget https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/3.17/swarm-client-3.17.jar ;\
|
|
|
|
mv swarm-client-3.17.jar swarm-client.jar
|
|
|
|
|
2019-10-07 15:32:25 +02:00
|
|
|
COPY start_agent.sh report_results.sh /scripts/
|
2019-10-07 14:08:34 +02:00
|
|
|
|
2019-10-16 09:47:17 +02:00
|
|
|
# for the phabtalk script
|
|
|
|
RUN pip3 install -r https://raw.githubusercontent.com/google/llvm-premerge-checks/master/scripts/phabtalk/requirements.txt
|
|
|
|
|
2019-10-07 14:08:34 +02:00
|
|
|
RUN groupadd -g ${gid} ${group} ;\
|
|
|
|
useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} ;\
|
|
|
|
mkdir /home/${user}/ccache
|
|
|
|
|
2019-10-14 18:14:19 +02:00
|
|
|
RUN chown -R ${user}:${user} /home/${user}
|
2019-10-07 14:08:34 +02:00
|
|
|
|
|
|
|
WORKDIR /home/${user}
|
2019-10-07 19:52:29 +02:00
|
|
|
ENV CCACHE_PATH=/mnt/disks/ssd0/ccache
|
2019-10-07 14:08:34 +02:00
|
|
|
|
2019-10-23 20:33:17 +02:00
|
|
|
# configure locale
|
|
|
|
RUN sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\
|
|
|
|
locale-gen
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LANGUAGE en_US:en
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
|
2019-10-07 14:08:34 +02:00
|
|
|
CMD ["/scripts/start_agent.sh"]
|
|
|
|
|