FROM opensuse/leap:42.3 MAINTAINER Suren A. Chilingaryan EXPOSE 80 VOLUME /adei ENV ADEI_REVISION=last:1 \ ADEI_PARALLEL=sources \ ADEI_SETUP=all \ ADEI_ENABLED_SETUPS="autogen logs" \ ADEI_PORTS=80 \ APACHE_SERVERS=0 \ MYSQL_SERVER=adei-mysql \ MYSQL_PORT=3306 \ MYSQL_USER=adei \ MYSQL_PASSWORD=adei \ MYSQL_DATABASE=adei \ LANG=en_US.UTF-8 \ LANGUAGE=en_US:en \ LC_ALL=en_US.UTF-8 COPY files/ / # Installation of ADEI & dependencies RUN zypper ar http://download.opensuse.org/repositories/home:/csa7fff:/adei/openSUSE_Leap_42.3/home:csa7fff:adei.repo && \ zypper ar http://download.opensuse.org/repositories/server:/php:/extensions/openSUSE_Leap_42.3/server:php:extensions.repo && \ zypper ar http://download.opensuse.org/repositories/devel:languages:python/openSUSE_Tumbleweed/devel:languages:python.repo && \ zypper --gpg-auto-import-keys ref -s && \ zypper -n in glibc-locale mc bzr git openssh telnet curl python-pycurl && \ zypper -n in supervisor procmail alpine which w3m && \ zypper -n in perl perl-DateTime-Format-Strptime mailx && \ zypper -n in make java && \ zypper -n in adei adei-config-default adei-req-mssql adei-webroot php-pecl-rrd && \ zypper -n in bzr-webdav && \ \ bash -c 'mkdir -p /adei/{src,cfg,tmp,sys,log,mail}' && \ /opt/scripts/configure.sh && \ \ # Replace packaged ADEI with repository version rm -rf /srv/www/htdocs/adei && \ ln -s /adei/src /srv/www/htdocs/adei && \ for name in $(find /srv -mindepth 1 -maxdepth 1 -name '*.sh'); do rm "$name"; ln -s "/adei/src/scripts/cron/$(basename $name)" "$name"; done && \ rm -f /etc/cron.d/adei.cron && \ ln -s /adei/src/scripts/cron/adei.cron /etc/cron.d/adei.cron && \ \ # Consolidate all volumes in /adei rm -rf /var/log/apache2 && \ ln -s /adei/log /var/log/apache2 && \ rm -rf /var/spool/mail && \ ln -s /adei/log /var/spool/mail && \ \ # Modify for non-priviledged mode chmod +rx /etc/php5/conf.d && \ ln -sf /etc/mime.types /etc/apache2/mime.types && \ find /etc/apache2 -type d -exec chmod +rx '{}' \; && \ chmod -R +r /etc/apache2 && \ chmod a+w /etc/apache2/listen.conf && \ chmod a+w /etc/apache2/server-tuning.conf && \ mkdir -p /etc/apache2/sysconfig.d && \ chmod a+rwx /etc/apache2/sysconfig.d && \ sed -i'' -re 's@/var/run@/tmp@' /usr/sbin/start_apache2 && \ chmod +x /usr/sbin/start_apache2 && \ \ # Ugly python needs to resolve user name chmod g=u /etc/passwd ENTRYPOINT ["/docker-entrypoint.sh"] CMD /usr/bin/supervisord -c /etc/supervisord.conf