this repo has no description
1# this Dockerfile must be built using the following command:
2# docker build -f ../ci/Debian.Dockerfile .
3# this command must be run while in the `debian` directory in the root of the repo.
4ARG BASE_IMAGE=ubuntu:jammy
5FROM $BASE_IMAGE
6LABEL name=darling-build-image version=0.1.0
7ARG DEBIAN_FRONTEND="noninteractive"
8RUN cp /etc/apt/sources.list /etc/apt/sources.list.d/sources-src.list && sed -i 's|deb http|deb-src http|g' /etc/apt/sources.list.d/sources-src.list
9RUN apt-get -y update
10RUN apt-get -y install cmake clang bison flex libfuse-dev libudev-dev pkg-config libc6-dev-i386 gcc-multilib libcairo2-dev libgl1-mesa-dev libglu1-mesa-dev libtiff5-dev libfreetype6-dev git git-lfs libelf-dev libxml2-dev libegl1-mesa-dev libfontconfig1-dev libbsd-dev libxrandr-dev libxcursor-dev libgif-dev libavutil-dev libpulse-dev libavformat-dev libavcodec-dev libswresample-dev libdbus-1-dev libxkbfile-dev libssl-dev llvm-dev libvulkan-dev && apt clean -y
11RUN apt-get -y install lsb-release && apt clean -y
12RUN apt-get -y install devscripts equivs debhelper && apt clean -y
13COPY control /control
14RUN mk-build-deps -i -r -t "apt-get --no-install-recommends -y" /control && apt clean -y
15RUN rm /control
16RUN apt-get -y install ccache && apt clean -y
17RUN apt-get -y install wget gpg ca-certificates && apt clean -y
18
19RUN if [ "$(clang --version | head -n 1 | cut -d ' ' -f 3 | cut -d '.' -f 1)" -lt 11 ]; then \
20 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
21 echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs) main" >> /etc/apt/sources.list.d/llvm.list && \
22 echo "deb-src http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs) main" >> /etc/apt/sources.list.d/llvm.list && \
23 apt-get update; \
24 fi
25
26RUN if [ "$(cmake --version | head -n 1 | cut -d ' ' -f 3 | awk '{print $1"\n3.20"}' | sort -Vr | head -n 1)" = "3.20" ]; then \
27 wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null && \
28 echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null && \
29 apt-get update; \
30 fi
31
32RUN apt-get install -y --only-upgrade clang cmake && apt clean -y
33
34ARG CI_UID=1111
35ARG CI_GID=1111
36RUN groupadd -g "${CI_GID}" ci || true
37RUN useradd -u "${CI_UID}" -g "${CI_GID}" -m ci || true
38RUN mkdir -p /ccache
39RUN mkdir -p /src/mnt
40RUN chown -R ${CI_UID}:${CI_GID} /src
41USER ${CI_UID}:${CI_GID}