From 2b1147af544bbfcff912ab195e36f78084d23ab2 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 19 Mar 2019 21:06:02 -0400 Subject: [PATCH] systemd container --- systemd/Dockerfile | 13 +++++++++++++ systemd/Dockerfile.centos | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 systemd/Dockerfile create mode 100644 systemd/Dockerfile.centos diff --git a/systemd/Dockerfile b/systemd/Dockerfile new file mode 100644 index 0000000..dd52f64 --- /dev/null +++ b/systemd/Dockerfile @@ -0,0 +1,13 @@ +FROM fedora +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 /etc/systemd/system/*.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/basic.target.wants/*;\ +rm -f /lib/systemd/system/anaconda.target.wants/*; +VOLUME [ "/sys/fs/cgroup" ] +CMD ["/usr/sbin/init"] diff --git a/systemd/Dockerfile.centos b/systemd/Dockerfile.centos new file mode 100644 index 0000000..a017789 --- /dev/null +++ b/systemd/Dockerfile.centos @@ -0,0 +1,13 @@ +FROM centos:7 +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 /etc/systemd/system/*.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/basic.target.wants/*;\ +rm -f /lib/systemd/system/anaconda.target.wants/*; +VOLUME [ "/sys/fs/cgroup" ] +CMD ["/usr/sbin/init"]