docker-rosariosis/Dockerfile

53 lines
1.6 KiB
Docker
Raw Normal View History

2016-06-29 20:51:06 +00:00
# Dockerfile for RosarioSIS
# https://www.rosariosis.org/
# Best Dockerfile practices: http://crosbymichael.com/dockerfile-best-practices.html
2015-05-16 17:42:04 +00:00
FROM ubuntu
2016-06-29 20:51:06 +00:00
MAINTAINER François Jacquet <info@rosariosis.org>
2015-02-23 18:22:18 +00:00
ENV DEBIAN_FRONTEND noninteractive
2016-06-29 20:51:06 +00:00
# Release info.
2015-05-16 17:42:04 +00:00
RUN /usr/bin/lsb_release -a
2016-06-29 20:51:06 +00:00
# Upgrade packages.
# Add universe depot.
RUN sed 's/main$/main universe/' -i /etc/apt/sources.list
# Change date to force an upgrade:
RUN apt-get update # 2016-06-29
RUN apt-get upgrade -y
# Install git, Apache2 + PHP + PostgreSQL webserver, sendmail, wkhtmltopdf & others utilities.
RUN apt-get install git postgresql sendmail sendmail-bin wkhtmltopdf supervisor apache2 \
libapache2-mod-php php-pgsql php-curl php-xmlrpc \
openssl wget telnet nmap -y --force-yes
RUN git clone https://github.com/francoisjacquet/rosariosis.git /usr/src/rosariosis
WORKDIR /usr/src/rosariosis
2015-02-23 18:22:18 +00:00
2016-06-29 20:51:06 +00:00
# Uncomment to checkout a tagged release:
# RUN git checkout 2.9.3
# Links rosariosis directory to Apache document root.
2015-02-23 18:22:18 +00:00
RUN rm -rf /var/www/html && mkdir -p /var/www && ln -s /usr/src/rosariosis/ /var/www/html && chmod 777 /var/www/html
2016-06-29 20:51:06 +00:00
# Copy our init script (creates rosariosis PostgreSQL DB & import rosariosis.sql file).
2015-05-18 00:05:05 +00:00
COPY bin/init /init
2016-06-29 20:51:06 +00:00
# Copy our start Apache2 script.
2015-05-18 00:05:05 +00:00
COPY bin/start-apache2 /start-apache2
2016-06-29 20:51:06 +00:00
# Copy our custom supervisord.conf file.
2015-05-18 00:05:05 +00:00
COPY conf/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
2016-06-29 20:51:06 +00:00
# Copy our custom RosarioSIS configuration file.
2015-05-18 00:05:05 +00:00
COPY conf/config.inc.php /usr/src/rosariosis/config.inc.php
2015-02-23 18:22:18 +00:00
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
EXPOSE 80
ENTRYPOINT [ "/init" ]