FROM almalinux:8

# Install systemd and basic utilities
RUN dnf -y install systemd systemd-libs epel-release \
    && dnf -y install bash-completion

# Copy installation script
COPY install_cma.sh /opt/centreon/install_cma.sh
RUN chmod +x /opt/centreon/install_cma.sh

# Set working directory
WORKDIR /opt/centreon

# Default command - start systemd
CMD ["/usr/sbin/init"]
