Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
FROM {{ item.image }}
ENV container docker
{% if 'centos' in item.image %}
RUN (cd /lib/systemd/system/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/*; \
rm -f /lib/systemd/system/*udev*; \
rm -f /lib/systemd/system/*initctl*; \
rm -f /lib/systemd/system/*;\
rm -f /lib/systemd/system/*;
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