# Rx3-Docker/MantisBT Dockerfile #------------------------------------------------------------------------------- ARG IMG_FROM_URL="rx3-docker/php-apache:latest" FROM ${IMG_FROM_URL} ARG IMG_NAME ARG IMG_NAME_FULL ARG IMG_VERSION ARG IMG_MAINTAINER LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL} LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION} LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER} LABEL maintainer=${IMG_MAINTAINER} ARG MANTISBT_VERSION=2.27.1 #--------------------------------------------------------------------------------------------------- ARG MANTISBT='#!/bin/bash \n\ \n\ chown -R apache:apache ${APACHE_DOC_ROOT} \n\ chmod -R a-x,a+X ${APACHE_DOC_ROOT} \n\ chmod o-rwx ${APACHE_DOC_ROOT} \n\ chmod -R o+rwX ${APACHE_DOC_ROOT}/mantisbt/config \n\ \n\ if [[ "${MANTISBT_ADMIN_ENABLED}" == "FALSE" ]] \n\ then \n\ chown root:root ${APACHE_DOC_ROOT}/mantisbt/admin \n\ mv ${APACHE_DOC_ROOT}/mantisbt/admin ${APACHE_DOC_ROOT}/mantisbt/admin.disabled \n\ fi \n\ \n\ sed -i -e "s%mailhub=mail%mailhub=${SMTP_SERVER}%" /etc/ssmtp/ssmtp.conf' #--------------------------------------------------------------------------------------------------- RUN urpmi.update -a \ && urpmi --force wget ssmtp php-xmlreader php-xmlwriter \ && wget -q -O - https://sourceforge.net/projects/mantisbt/files/mantis-stable/${MANTISBT_VERSION}/mantisbt-${MANTISBT_VERSION}.tar.gz/download | tar xzvf - -C /var/www/html \ && mv /var/www/html/mantisbt-${MANTISBT_VERSION} /var/www/html/mantisbt \ && chown -R root:root /var/www \ && chmod -R 775 /var/www \ && echo -e "${MANTISBT}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/mantisbt \ && chmod a+x /etc/init.d/mantisbt \ && ln -s /etc/init.d/mantisbt /etc/rcD.d/S40mantisbt