Created
November 18, 2021 03:44
-
-
Save mrlesmithjr/e9cee7f12184c61df6e242d21f5bdd6c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM {{ item.image }} | |
ENV container docker | |
{% if 'centos' in item.image %} | |
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/*; | |
RUN yum install -y epel-release python3 sudo | |
CMD ["/usr/sbin/init"] | |
{% elif 'debian' in item.image or 'ubuntu' in item.image %} | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends python3 sudo systemd | |
CMD ["/lib/systemd/systemd"] | |
{% endif %} | |
VOLUME ["/sys/fs/cgroup", "/tmp", "/run"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment