Repos with recipes to deploy some infrastructure services
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

27 lignes
1.2 KiB

  1. # Molecule managed
  2. FROM {{ item.image }}
  3. ENV container docker
  4. # Configure systemd to run into the container (see https://hub.docker.com/_/centos/)
  5. RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
  6. rm -f /lib/systemd/system/multi-user.target.wants/*;\
  7. rm -f /etc/systemd/system/*.wants/*;\
  8. rm -f /lib/systemd/system/local-fs.target.wants/*; \
  9. rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
  10. rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
  11. rm -f /lib/systemd/system/basic.target.wants/*;\
  12. rm -f /lib/systemd/system/anaconda.target.wants/*;
  13. # Install sudo and disable requiretty
  14. RUN yum -y install sudo
  15. RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
  16. VOLUME [ "/sys/fs/cgroup" ]
  17. CMD ["/usr/sbin/init"]
  18. RUN if [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python python-devel python2-dnf net-tools bash && dnf clean all; \
  19. elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl net-tools bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; fi