2022-12-25 14:57:47 +01:00
|
|
|
FROM debian:stable
|
|
|
|
|
|
|
|
RUN echo 'intall packages'; \
|
|
|
|
apt-get update; \
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
locales openssh-client gnupg ca-certificates \
|
|
|
|
zip wget git \
|
2023-04-21 10:15:01 +02:00
|
|
|
gdb build-essential \
|
2022-12-25 14:57:47 +01:00
|
|
|
ninja-build \
|
|
|
|
libelf-dev libffi-dev gcc-multilib \
|
2023-01-30 12:48:19 +01:00
|
|
|
# for llvm-libc tests that build mpfr and gmp from source
|
2022-12-25 14:57:47 +01:00
|
|
|
autoconf automake libtool \
|
|
|
|
ccache \
|
|
|
|
python3 python3-psutil \
|
|
|
|
python3-pip python3-setuptools \
|
|
|
|
lsb-release software-properties-common \
|
2023-01-30 12:48:19 +01:00
|
|
|
swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq \
|
|
|
|
# for llvm installation script
|
|
|
|
sudo;
|
2022-12-25 14:57:47 +01:00
|
|
|
|
2023-04-21 10:15:01 +02:00
|
|
|
# debian stable cmake is 3.18, we need to install a more recent version.
|
|
|
|
RUN wget --no-verbose -O /cmake.sh https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3-linux-x86_64.sh; \
|
|
|
|
chmod +x /cmake.sh; \
|
|
|
|
mkdir -p /etc/cmake; \
|
|
|
|
/cmake.sh --prefix=/etc/cmake --skip-license; \
|
|
|
|
ln -s /etc/cmake/bin/cmake /usr/bin/cmake; \
|
|
|
|
cmake --version; \
|
|
|
|
rm /cmake.sh
|
|
|
|
|
2022-12-25 14:57:47 +01:00
|
|
|
# LLVM must be installed after prerequsite packages.
|
2023-04-21 10:15:01 +02:00
|
|
|
ENV LLVM_VERSION=16
|
2022-12-25 14:57:47 +01:00
|
|
|
RUN echo 'install llvm ${LLVM_VERSION}'; \
|
2023-04-21 10:15:01 +02:00
|
|
|
wget --no-verbose https://apt.llvm.org/llvm.sh; \
|
2022-12-25 14:57:47 +01:00
|
|
|
chmod +x llvm.sh; \
|
|
|
|
./llvm.sh ${LLVM_VERSION};\
|
|
|
|
apt-get update; \
|
|
|
|
apt install -y clang-${LLVM_VERSION} clang-format-${LLVM_VERSION} clang-tidy-${LLVM_VERSION} lld-${LLVM_VERSION}; \
|
|
|
|
ln -s /usr/bin/clang-${LLVM_VERSION} /usr/bin/clang;\
|
|
|
|
ln -s /usr/bin/clang++-${LLVM_VERSION} /usr/bin/clang++;\
|
|
|
|
ln -s /usr/bin/clang-tidy-${LLVM_VERSION} /usr/bin/clang-tidy;\
|
|
|
|
ln -s /usr/bin/clang-tidy-diff-${LLVM_VERSION}.py /usr/bin/clang-tidy-diff;\
|
|
|
|
ln -s /usr/bin/clang-format-${LLVM_VERSION} /usr/bin/clang-format;\
|
|
|
|
ln -s /usr/bin/clang-format-diff-${LLVM_VERSION} /usr/bin/clang-format-diff;\
|
|
|
|
ln -s /usr/bin/lld-${LLVM_VERSION} /usr/bin/lld;\
|
2023-01-30 12:48:19 +01:00
|
|
|
ln -s /usr/bin/lldb-${LLVM_VERSION} /usr/bin/lldb;\
|
2022-12-25 14:57:47 +01:00
|
|
|
ln -s /usr/bin/ld.lld-${LLVM_VERSION} /usr/bin/ld.lld
|
|
|
|
|
|
|
|
RUN echo 'configure locale'; \
|
|
|
|
sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\
|
|
|
|
locale-gen ;\
|
|
|
|
echo 'make python 3 default'; \
|
|
|
|
rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python; \
|
|
|
|
pip3 install wheel
|
|
|
|
|
|
|
|
# Configure locale
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LANGUAGE en_US:en
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
2020-04-22 16:51:22 +02:00
|
|
|
|
|
|
|
RUN echo 'install buildkite' ;\
|
|
|
|
apt-get install -y apt-transport-https gnupg;\
|
|
|
|
sh -c 'echo deb https://apt.buildkite.com/buildkite-agent stable main > /etc/apt/sources.list.d/buildkite-agent.list' ;\
|
|
|
|
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 ;\
|
|
|
|
apt-get update ;\
|
2021-05-15 10:58:23 +02:00
|
|
|
apt-get install -y buildkite-agent tini gosu; \
|
2020-04-22 16:51:22 +02:00
|
|
|
apt-get clean;
|
|
|
|
COPY *.sh /usr/local/bin/
|
2020-04-24 12:49:07 +02:00
|
|
|
RUN chmod og+rx /usr/local/bin/*.sh
|
2020-06-17 14:41:00 +02:00
|
|
|
COPY --chown=buildkite-agent:buildkite-agent pre-checkout /etc/buildkite-agent/hooks
|
2021-07-27 18:14:50 +02:00
|
|
|
COPY --chown=buildkite-agent:buildkite-agent post-checkout /etc/buildkite-agent/hooks
|
2021-05-14 14:54:57 +02:00
|
|
|
|
2022-01-19 13:30:40 +01:00
|
|
|
# buildkite working directory
|
|
|
|
VOLUME /var/lib/buildkite-agent
|
|
|
|
|
2021-05-14 14:54:57 +02:00
|
|
|
ENTRYPOINT ["entrypoint.sh"]
|
2022-12-25 14:57:47 +01:00
|
|
|
CMD ["gosu", "buildkite-agent", "buildkite-agent", "start", "--no-color"]
|