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
|
|
|
|
|
2017-09-22 06:08:06 +00:00
|
|
|
FROM php:5.6-apache
|
2016-06-29 20:51:06 +00:00
|
|
|
|
2016-06-29 22:36:10 +00:00
|
|
|
MAINTAINER François Jacquet <francoisjacquet@users.noreply.github.com>
|
2015-02-23 18:22:18 +00:00
|
|
|
|
2016-06-29 20:51:06 +00:00
|
|
|
# Upgrade packages.
|
|
|
|
# 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.
|
2017-09-22 06:08:06 +00:00
|
|
|
RUN apt-get install postgresql-client wkhtmltopdf libpq-dev libpng-dev libxml2-dev sendmail -y;
|
2016-06-29 20:51:06 +00:00
|
|
|
|
2017-09-22 06:08:06 +00:00
|
|
|
RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
|
|
|
|
docker-php-ext-install -j$(nproc) gd mbstring xml pgsql gettext xmlrpc
|
2015-02-23 18:22:18 +00:00
|
|
|
|
2017-09-22 06:08:06 +00:00
|
|
|
RUN mkdir /usr/src/rosariosis && curl -L https://github.com/francoisjacquet/rosariosis/tarball/v3.5 | tar xz --strip-components=1 -C /usr/src/rosariosis
|
2016-06-29 20:51:06 +00:00
|
|
|
|
2017-09-22 06:08:06 +00:00
|
|
|
WORKDIR /usr/src/rosariosis
|
2015-02-23 18:22:18 +00:00
|
|
|
|
2017-09-22 06:08:06 +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 &&\
|
|
|
|
chown -R www-data:www-data /usr/src/rosariosis
|
2016-06-29 20:51:06 +00:00
|
|
|
|
|
|
|
|
2017-09-22 06:08:06 +00:00
|
|
|
# Uncomment to checkout a tagged release:
|
|
|
|
# RUN git checkout 2.9.3
|
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
|
2017-09-22 06:08:06 +00:00
|
|
|
COPY conf/.htaccess /usr/src/rosariosis/.htaccess
|
|
|
|
COPY bin/init /init
|
2015-02-23 18:22:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
2017-09-22 06:08:06 +00:00
|
|
|
ENTRYPOINT ["/init"]
|
|
|
|
CMD ["apache2-foreground"]
|