Dockerfile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. FROM rockylinux/rockylinux:8.5
  2. RUN dnf install -y \
  3. epel-release \
  4. && dnf clean all \
  5. && rm -rf /var/cache/dnf
  6. RUN mkdir /root/omnia
  7. RUN dnf install -y mod_ssl \
  8. python3-librepo \
  9. python3-schema \
  10. syslinux \
  11. wget \
  12. dhcp-server \
  13. pykickstart \
  14. dnf-plugins-core \
  15. cronie \
  16. xinetd \
  17. python3-coverage \
  18. python3-cheetah \
  19. python3-netaddr \
  20. python3-distro \
  21. python3-devel \
  22. python3-future \
  23. python3-mod_wsgi \
  24. gcc \
  25. xinetd \
  26. epel-rpm-macros \
  27. rpm-build \
  28. ansible \
  29. make \
  30. grub2-efi-x64-modules \
  31. efibootmgr \
  32. && dnf clean all \
  33. && rm -rf /var/cache/dnf
  34. RUN yum install -y grub2-efi-x64 shim-x64
  35. RUN yum install -y yum-utils
  36. RUN dnf config-manager --set-enabled powertools
  37. RUN dnf install -y python3-sphinx
  38. RUN pip3 install wheel
  39. RUN dnf module enable -y cobbler
  40. RUN dnf install -y cobbler
  41. RUN dnf install -y cobbler-web
  42. #Copy Configuration files
  43. COPY settings.yaml /etc/cobbler/settings.yaml
  44. COPY dhcp.template /etc/cobbler/dhcp.template
  45. COPY modules.conf /etc/cobbler/modules.conf
  46. COPY tftp /etc/xinetd.d/tftp
  47. COPY .users.digest /etc/cobbler/users.digest
  48. COPY cobbler_configurations.yml /root
  49. COPY tftp.yml /root
  50. COPY inventory_creation.yml /root
  51. EXPOSE 69 80 443 25151
  52. VOLUME [ "/var/www/cobbler", "/var/lib/cobbler/backup", "/mnt" ]
  53. RUN systemctl enable httpd
  54. RUN systemctl enable dhcpd
  55. CMD ["sbin/init"]