3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00
farmOS/Dockerfile

69 lines
2.2 KiB
Docker
Raw Normal View History

# Inherit from the PHP 5.6 Apache image on Docker Hub.
FROM php:5.6-apache
2016-08-05 08:01:14 +02:00
# Set environment variables.
ENV FARMOS_VERSION 7.x-1.0-beta16
ENV FARMOS_DEV_BRANCH 7.x-1.x
ENV FARMOS_DEV false
2016-10-16 15:45:41 +02:00
# Enable Apache rewrite module.
RUN a2enmod rewrite
# Install the PHP extensions that Drupal needs.
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev \
2016-10-22 03:05:00 +02:00
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
2017-05-09 17:39:17 +02:00
&& docker-php-ext-install bcmath gd mbstring opcache pdo pdo_mysql pdo_pgsql zip
2016-10-18 01:56:30 +02:00
# Set recommended realpath_cache settings.
# See https://www.drupal.org/docs/7/managing-site-performance/tuning-phpini-for-drupal
RUN { \
echo 'realpath_cache_size=256K'; \
echo 'realpath_cache_ttl=3600'; \
} > /usr/local/etc/php/conf.d/realpath_cache-recommended.ini
2016-10-18 01:56:30 +02:00
# Set recommended opcache settings.
# See https://secure.php.net/manual/en/opcache.installation.php
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=50000'; \
2016-10-18 01:56:30 +02:00
echo 'opcache.revalidate_freq=60'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
2016-10-21 01:23:40 +02:00
# Install PECL Uploadprogress.
RUN pecl install uploadprogress \
&& echo 'extension=uploadprogress.so' > /usr/local/etc/php/conf.d/uploadprogress.ini
# Install Git.
RUN apt-get update && apt-get install -y git
2016-08-05 08:01:14 +02:00
# Build and install the GEOS PHP extension.
RUN apt-get update && apt-get install -y libgeos-dev bzip2 \
&& curl -fsSL 'http://download.osgeo.org/geos/geos-3.4.2.tar.bz2' -o geos.tar.bz2 \
&& mkdir -p geos \
&& tar -xf geos.tar.bz2 -C geos --strip-components=1 \
&& rm geos.tar.bz2 \
&& ( \
cd geos \
&& ./configure --enable-php \
&& make \
&& make install \
) \
&& rm -r geos \
&& docker-php-ext-enable geos
2016-09-23 17:23:40 +02:00
# Install Drush.
2016-10-12 07:15:14 +02:00
RUN curl -fSL "http://files.drush.org/drush.phar" -o /usr/local/bin/drush \
&& chmod +x /usr/local/bin/drush
2016-08-05 08:01:14 +02:00
2016-10-12 08:23:26 +02:00
# Mount a volume at /var/www/html.
VOLUME /var/www/html
# Set the entrypoint.
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]