Skip to content

Commit 6ba12c1

Browse files
Samiur Arifjeffreyc-splunk
andauthored
adding ubuntu 24.04 LTS (#4941)
* adding ubuntu 24.04 LTS Signed-off-by: Samiur Arif <[email protected]> * added ubuntu 24.04 image" Signed-off-by: Samiur Arif <[email protected]> * added ubuntu 24.04 image" Signed-off-by: Samiur Arif <[email protected]> * Update internal/buildscripts/packaging/tests/instrumentation/images/deb/Dockerfile.ubuntu-noble Co-authored-by: Jeff Cheng <[email protected]> Signed-off-by: Samiur Arif <[email protected]> --------- Signed-off-by: Samiur Arif <[email protected]> Co-authored-by: Jeff Cheng <[email protected]>
1 parent 5ff25e0 commit 6ba12c1

File tree

4 files changed

+72
-2
lines changed

4 files changed

+72
-2
lines changed

internal/buildscripts/packaging/installer/install.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ distro_is_supported() {
968968
case "$distro" in
969969
ubuntu)
970970
case "$distro_codename" in
971-
bionic|focal|xenial|jammy)
971+
bionic|focal|xenial|jammy|noble)
972972
return 0
973973
;;
974974
esac
@@ -1037,6 +1037,9 @@ fluentd_supported() {
10371037
if [ "$distro_version" = "16.04" ] && [ "$distro_arch" = "aarch64" ]; then
10381038
return 1
10391039
fi
1040+
if [ "$distro_version" = "24.04" ]; then
1041+
return 1
1042+
fi
10401043
;;
10411044
esac
10421045

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM ubuntu:noble
2+
3+
ENV DEBIAN_FRONTEND noninteractive
4+
5+
RUN apt-get update &&\
6+
apt-get install -yq ca-certificates curl procps systemd wget
7+
8+
ENV container docker
9+
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \
10+
"systemd-tmpfiles-setup.service" ] || rm -f $i; done); \
11+
rm -f /lib/systemd/system/multi-user.target.wants/*;\
12+
rm -f /lib/systemd/system/local-fs.target.wants/*; \
13+
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
14+
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
15+
rm -f /lib/systemd/system/anaconda.target.wants/*;
16+
17+
RUN systemctl set-default multi-user.target
18+
ENV init /lib/systemd/systemd
19+
20+
VOLUME [ "/sys/fs/cgroup" ]
21+
22+
ENTRYPOINT ["/lib/systemd/systemd"]

internal/buildscripts/packaging/tests/installer_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ def fluentd_supported(distro, arch):
210210
return False
211211
elif distro == "debian-bookworm":
212212
return False
213-
213+
elif distro == "ubuntu-noble":
214+
return False
214215
return True
215216

216217

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# A ubuntu image with systemd enabled. Must be run with:
2+
# `-d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` flags
3+
FROM tomcat:9-jre8 as tomcat
4+
5+
FROM ubuntu:noble
6+
7+
ARG TARGETARCH
8+
9+
ENV DEBIAN_FRONTEND noninteractive
10+
11+
RUN apt-get update &&\
12+
apt-get install -yq ca-certificates curl procps python3 systemd wget
13+
14+
ENV container docker
15+
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \
16+
"systemd-tmpfiles-setup.service" ] || rm -f $i; done); \
17+
rm -f /lib/systemd/system/multi-user.target.wants/*;\
18+
rm -f /lib/systemd/system/local-fs.target.wants/*; \
19+
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
20+
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
21+
rm -f /lib/systemd/system/anaconda.target.wants/*;
22+
23+
COPY --from=tomcat /usr/local/tomcat /usr/local/tomcat
24+
COPY --from=tomcat /opt/java /opt/java
25+
COPY instrumentation/setup-tomcat.sh /opt/
26+
RUN bash /opt/setup-tomcat.sh
27+
28+
ARG NODE_VERSION=v16
29+
COPY instrumentation/setup-express.sh /opt
30+
RUN bash /opt/setup-express.sh
31+
32+
COPY instrumentation/setup-dotnet.sh /opt
33+
RUN if [ "$TARGETARCH" = "amd64" ]; then \
34+
apt-get update && \
35+
apt-get install -yq libicu74 && \
36+
bash /opt/setup-dotnet.sh; \
37+
fi
38+
39+
RUN systemctl set-default multi-user.target
40+
ENV init /lib/systemd/systemd
41+
42+
VOLUME [ "/sys/fs/cgroup" ]
43+
44+
ENTRYPOINT ["/lib/systemd/systemd"]

0 commit comments

Comments
 (0)