docker-rosariosis/Dockerfile

47 lines
1.7 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
2019-09-22 19:49:31 +00:00
# https://hub.docker.com/_/php?tab=tags&page=1&name=apache
2021-02-14 11:46:30 +00:00
# TODO When moving to PHP8.0, remove xmlrpc extension!
2020-08-20 11:10:00 +00:00
FROM php:7.4-apache
2016-06-29 20:51:06 +00:00
2017-09-22 17:48:14 +00:00
LABEL maintainer="François Jacquet <francoisjacquet@users.noreply.github.com>"
2015-02-23 18:22:18 +00:00
2019-09-22 19:49:31 +00:00
ENV PGHOST=db \
PGUSER=rosario \
PGPASSWORD=rosariopwd \
PGDATABASE=rosariosis \
2017-09-22 17:48:14 +00:00
PGPORT=5432 \
ROSARIOSIS_YEAR=2022 \
2017-09-22 17:48:14 +00:00
ROSARIOSIS_LANG='en_US'
2016-06-29 20:51:06 +00:00
2017-09-22 17:48:14 +00:00
# Upgrade packages.
2016-06-29 20:51:06 +00:00
# Install git, Apache2 + PHP + PostgreSQL webserver, sendmail, wkhtmltopdf & others utilities.
2017-09-22 17:48:14 +00:00
RUN apt-get update && \
apt-get upgrade -y && \
2020-11-25 14:19:06 +00:00
apt-get install postgresql-client wkhtmltopdf libpq-dev libpng-dev libxml2-dev libzip-dev libonig-dev sendmail nano locales -y;
2015-02-23 18:22:18 +00:00
2019-09-22 19:49:31 +00:00
# Install PHP extensions.
2017-09-22 17:48:14 +00:00
RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
2022-04-09 15:10:03 +00:00
docker-php-ext-install -j$(nproc) gd mbstring xml pgsql gettext intl xmlrpc zip
2017-09-22 17:48:14 +00:00
# Download and extract rosariosis
2022-09-07 16:06:52 +00:00
ENV ROSARIOSIS_VERSION 'v10.2'
2017-09-22 17:48:14 +00:00
RUN mkdir /usr/src/rosariosis && \
curl -L https://gitlab.com/francoisjacquet/rosariosis/-/archive/${ROSARIOSIS_VERSION}/rosariosis-${ROSARIOSIS_VERSION}.tar.gz \
2017-09-22 17:48:14 +00:00
| tar xz --strip-components=1 -C /usr/src/rosariosis && \
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
2019-09-22 19:49:31 +00:00
# Copy our configuration files.
2015-05-18 00:05:05 +00:00
COPY conf/config.inc.php /usr/src/rosariosis/config.inc.php
COPY conf/.htaccess /usr/src/rosariosis/.htaccess
COPY bin/init /init
2015-02-23 18:22:18 +00:00
EXPOSE 80
ENTRYPOINT ["/init"]
CMD ["apache2-foreground"]