diff --git a/internal/buildscripts/packaging/fpm/Dockerfile b/internal/buildscripts/packaging/fpm/Dockerfile index ec3ff295ff0d..17cd13f56215 100644 --- a/internal/buildscripts/packaging/fpm/Dockerfile +++ b/internal/buildscripts/packaging/fpm/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:9 +FROM debian:11 RUN apt-get update && \ apt-get install -y ruby ruby-dev rubygems build-essential git rpm diff --git a/internal/buildscripts/packaging/fpm/deb/Dockerfile.test b/internal/buildscripts/packaging/fpm/deb/Dockerfile.test index f4a7ce84aeb4..dcfac148f0fa 100644 --- a/internal/buildscripts/packaging/fpm/deb/Dockerfile.test +++ b/internal/buildscripts/packaging/fpm/deb/Dockerfile.test @@ -1,22 +1,22 @@ -# A debian9 image with systemd enabled. Must be run with: +# A debian11 image with systemd enabled. Must be run with: # `-d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` flags -FROM debian:9 - -RUN apt-get update &&\ - apt-get install -yq ca-certificates procps systemd +FROM debian:11 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/*; +ENV DEBIAN_FRONTEND noninteractive -RUN systemctl set-default multi-user.target -ENV init /lib/systemd/systemd +# Enable systemd. +RUN apt-get update ; \ + apt-get install -y systemd systemd-sysv procps; \ + apt-get clean ; \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ; \ + rm -rf /lib/systemd/system/multi-user.target.wants/* ; \ + rm -rf /etc/systemd/system/*.wants/* ; \ + rm -rf /lib/systemd/system/local-fs.target.wants/* ; \ + rm -rf /lib/systemd/system/sockets.target.wants/*udev* ; \ + rm -rf /lib/systemd/system/sockets.target.wants/*initctl* ; \ + rm -rf /lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup* ; \ + rm -rf /lib/systemd/system/systemd-update-utmp* VOLUME [ "/sys/fs/cgroup" ] - -ENTRYPOINT ["/lib/systemd/systemd"] +CMD ["/lib/systemd/systemd"]