Skip to content

Commit

Permalink
Add debian bookworm for instrumentation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyc-splunk committed Oct 17, 2023
1 parent 24ed35b commit 372c9fe
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# A debian image with systemd enabled. Must be run with:
# `-d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` flags
FROM tomcat:9-jre8 as tomcat

FROM debian:bookworm

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update &&\
apt-get install -yq ca-certificates curl procps python3 systemd wget

ENV container docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \
"systemd-tmpfiles-setup.service" ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/anaconda.target.wants/*;

COPY --from=tomcat /usr/local/tomcat /usr/local/tomcat
COPY --from=tomcat /opt/java /opt/java
COPY instrumentation/setup-tomcat.sh /opt/
RUN bash /opt/setup-tomcat.sh

ARG NODE_VERSION=v16
COPY instrumentation/setup-express.sh /opt
RUN bash /opt/setup-express.sh

RUN systemctl set-default multi-user.target
ENV init /lib/systemd/systemd

VOLUME [ "/sys/fs/cgroup" ]

ENTRYPOINT ["/lib/systemd/systemd"]

0 comments on commit 372c9fe

Please sign in to comment.