FROM oraclelinux:8


# Install systemd and basic utilities
RUN dnf -y install systemd systemd-libs epel-release \
    && dnf -y install bash-completion && dnf install -y oracle-epel-release-el8 \
    && dnf config-manager --set-enabled ol8_developer_EPEL \
    && dnf config-manager --set-enabled ol8_codeready_builder


# 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"]
