Dockerfile 1.6 KB

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