Skip to content

Commit a2d7892

Browse files
authored
Ubuntu 24.04 (#404)
1 parent 770421d commit a2d7892

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

docker/ubuntu2404/Dockerfile

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
FROM ubuntu:24.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
RUN <<EOF
6+
set -e
7+
8+
apt-get update
9+
10+
apt-get -y install build-essential llvm lld ccache \
11+
make pkgconf bison flex g++ clang gettext libc++-dev autoconf automake \
12+
libtool autotools-dev git distcc file wget openssl hwloc intltool-debian \
13+
clang-tools-14 clang-14 cmake ninja-build
14+
15+
apt-get -y install libssl-dev libexpat1-dev \
16+
libpcre3-dev libcap-dev libhwloc-dev libunwind8 libunwind-dev zlib1g-dev \
17+
libjemalloc-dev libluajit-5.1-dev liblzma-dev \
18+
libhiredis-dev libbrotli-dev libncurses-dev libgeoip-dev libmagick++-dev \
19+
libmaxminddb-dev libcjose-dev libcjose0 libjansson-dev
20+
21+
apt-get -y autoremove
22+
apt-get -y clean
23+
EOF
24+
25+
# We put our custom packages in /opt.
26+
RUN <<EOF
27+
set -e
28+
mkdir -p /opt/bin
29+
chmod 755 /opt/bin
30+
echo 'PATH=/opt/bin:$PATH' | tee -a /etc/bash.bashrc
31+
EOF
32+
33+
ARG PATH=/opt/bin:$PATH
34+
35+
# Install nuraft for the stek_share plugin. Distros, unfortunately, do not
36+
# package these, so this has to be built by hand.
37+
RUN <<EOF
38+
set -e
39+
40+
git clone https://github.com/eBay/NuRaft.git
41+
cd NuRaft
42+
./prepare.sh
43+
44+
cmake \
45+
-B build \
46+
-G Ninja \
47+
-DCMAKE_INSTALL_PREFIX=/opt/
48+
cmake --build build
49+
cmake --install build
50+
cd ../
51+
rm -rf NuRaft
52+
EOF
53+
54+
# Add the CI's test user. N.B: 1200 is the uid that our jenkins user is
55+
# configured with, so that has to be used. Otherwise there will be permissions
56+
# issues.
57+
ARG username=jenkins
58+
ARG uid=1200
59+
RUN <<EOF
60+
set -e
61+
useradd \
62+
--home-dir /home/${username} \
63+
--groups users,sudo \
64+
--uid ${uid} \
65+
--shell /bin/bash \
66+
--create-home \
67+
${username}
68+
echo "${username} ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers
69+
chown -R ${username} /home/${username}
70+
EOF

0 commit comments

Comments
 (0)