Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4da4bea

Browse files
committed
ci: add an Ubuntu Noble dockerfile
1 parent edeec76 commit 4da4bea

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

ci/docker/noble

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
ARG BASE=ubuntu:noble
2+
3+
FROM ${BASE} AS apt
4+
RUN apt-get update && \
5+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
6+
bzip2 \
7+
clang \
8+
cmake \
9+
curl \
10+
gcc \
11+
git \
12+
krb5-user \
13+
libclang-rt-17-dev \
14+
libcurl4-gnutls-dev \
15+
libgcrypt20-dev \
16+
libkrb5-dev \
17+
libpcre3-dev \
18+
libssl-dev \
19+
libz-dev \
20+
llvm-17 \
21+
make \
22+
ninja-build \
23+
openjdk-8-jre-headless \
24+
openssh-server \
25+
openssl \
26+
pkgconf \
27+
python3 \
28+
sudo \
29+
valgrind \
30+
&& \
31+
rm -rf /var/lib/apt/lists/* && \
32+
mkdir /usr/local/msan
33+
34+
FROM apt AS mbedtls
35+
RUN cd /tmp && \
36+
curl --location --silent --show-error https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-2.28.6.tar.gz | \
37+
tar -xz && \
38+
cd mbedtls-mbedtls-2.28.6 && \
39+
scripts/config.pl unset MBEDTLS_AESNI_C && \
40+
scripts/config.pl set MBEDTLS_MD4_C 1 && \
41+
mkdir build build-msan && \
42+
cd build && \
43+
CC=clang-17 CFLAGS="-fPIC" cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=ON -DUSE_STATIC_MBEDTLS_LIBRARY=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
44+
ninja install && \
45+
cd ../build-msan && \
46+
CC=clang-17 CFLAGS="-fPIC" cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=ON -DUSE_STATIC_MBEDTLS_LIBRARY=OFF -DCMAKE_BUILD_TYPE=MemSanDbg -DCMAKE_INSTALL_PREFIX=/usr/local/msan .. && \
47+
ninja install && \
48+
cd .. && \
49+
rm -rf mbedtls-mbedtls-2.28.6
50+
51+
FROM mbedtls AS libssh2
52+
RUN cd /tmp && \
53+
curl --location --silent --show-error https://www.libssh2.org/download/libssh2-1.11.0.tar.gz | tar -xz && \
54+
cd libssh2-1.11.0 && \
55+
mkdir build build-msan && \
56+
cd build && \
57+
CC=clang-17 CFLAGS="-fPIC" cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
58+
ninja install && \
59+
cd ../build-msan && \
60+
CC=clang-17 CFLAGS="-fPIC -fsanitize=memory -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer" LDFLAGS="-fsanitize=memory" cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCRYPTO_BACKEND=mbedTLS -DCMAKE_PREFIX_PATH=/usr/local/msan -DCMAKE_INSTALL_PREFIX=/usr/local/msan .. && \
61+
ninja install && \
62+
cd .. && \
63+
rm -rf libssh2-1.11.0
64+
65+
FROM libssh2 AS valgrind
66+
RUN cd /tmp && \
67+
curl --insecure --location --silent --show-error https://sourceware.org/pub/valgrind/valgrind-3.22.0.tar.bz2 | \
68+
tar -xj && \
69+
cd valgrind-3.22.0 && \
70+
CC=clang-17 ./configure && \
71+
make MAKEFLAGS="-j -l$(grep -c ^processor /proc/cpuinfo)" && \
72+
make install && \
73+
cd .. && \
74+
rm -rf valgrind-3.22.0
75+
76+
FROM valgrind AS adduser
77+
ARG UID=""
78+
ARG GID=""
79+
RUN if [ "${UID}" != "" ]; then USER_ARG="--uid ${UID}"; fi && \
80+
if [ "${GID}" != "" ]; then GROUP_ARG="--gid ${GID}"; fi && \
81+
groupadd ${GROUP_ARG} libgit2 && \
82+
useradd ${USER_ARG} --gid libgit2 --shell /bin/bash --create-home libgit2
83+
84+
FROM adduser AS ldconfig
85+
RUN ldconfig
86+
87+
FROM ldconfig AS configure
88+
RUN mkdir /var/run/sshd

0 commit comments

Comments
 (0)