1FROM debian:10
2
3# Installing dependecies.
4RUN dpkg --add-architecture i386
5RUN apt-get update
6RUN apt-get install -y build-essential clang subversion git vim \
7  zip libstdc++6:i386 file binutils-dev binutils-gold cmake python-pip \
8  ninja-build
9RUN python -m pip install buildbot-slave==0.8.12
10
11# Change linker to gold.
12RUN update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
13
14# Create and switch to buildbot user.
15RUN useradd buildbot --create-home
16USER buildbot
17
18WORKDIR /home/buildbot
19
20# Use clang as the compiler.
21ENV CC=/usr/bin/clang
22ENV CXX=/usr/bin/clang++
23
24ENV WORKER_NAME="libc-x86_64-debian"
25
26# Set up buildbot host and maintainer info.
27RUN mkdir -p "${WORKER_NAME}/info/"
28RUN bash -c "(uname -a ; \
29  gcc --version | head -n1 ; ld --version \
30  | head -n1 ; cmake --version | head -n1 ) > ${WORKER_NAME}/info/host"
31RUN echo "Paula Toth <[email protected]>" > "${WORKER_NAME}/info/admin"
32
33ADD --chown=buildbot:buildbot run.sh .
34ENTRYPOINT ["./run.sh"]
35