6a15d9da9c
The acceptance tests require several elements to be set up in order to be run. Besides those PHP packages that it depends on, like Behat or Mink, it requires a running Selenium server and a Docker image with the Nextcloud server to be tested available in the system. The "run.sh" script takes care of preparing all the needed elements and then run the acceptance tests; once finished, either normally or due to an error, it also cleans up the temporal elements created/started by the script and the acceptance tests. The Docker image with the Nextcloud server to be tested is created from the Nextcloud code in the greatparent directory each time "run.sh" is executed; the code is copied inside the image, so once the acceptance tests are started the code in the greatparent directory can be modified without affecting them. As it is based on the current code at the time of the launch that image is created and destroyed each time the acceptance tests are run. However, the image that it is based on, which is created using "docker/nextcloud-local-parent/Dockerfile", does not change between runs, so it is kept built in the system to speed up the launch of acceptance tests. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
52 lines
1.9 KiB
Docker
52 lines
1.9 KiB
Docker
# This Dockerfile builds an image of a system in which a Nextcloud server could
|
|
# be installed. It is based on the Dockerfile for Nextcloud 11 on Apache
|
|
# (https://github.com/nextcloud/docker/blob/843d309ee62b9d2704e6141d2103f9ded97e35b6/11.0/apache/Dockerfile),
|
|
# although without the download and copy of a specific Nextcloud version; there
|
|
# is no volume either at "/var/www/html" to make possible to create a new image
|
|
# from a container based on this image that includes the installed Nextcloud
|
|
# server of the container (as the command to generate a new image from a
|
|
# container, "docker commit", does not include in the new image any data stored
|
|
# in volumes mounted inside the container).
|
|
|
|
FROM php:7.1-apache
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
bzip2 \
|
|
libcurl4-openssl-dev \
|
|
libfreetype6-dev \
|
|
libicu-dev \
|
|
libjpeg-dev \
|
|
libldap2-dev \
|
|
libmcrypt-dev \
|
|
libmemcached-dev \
|
|
libpng12-dev \
|
|
libpq-dev \
|
|
libxml2-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# https://docs.nextcloud.com/server/9/admin_manual/installation/source_installation.html
|
|
RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
|
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \
|
|
&& docker-php-ext-install gd exif intl mbstring mcrypt ldap mysqli opcache pdo_mysql pdo_pgsql pgsql zip
|
|
|
|
# set recommended PHP.ini 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=4000'; \
|
|
echo 'opcache.revalidate_freq=60'; \
|
|
echo 'opcache.fast_shutdown=1'; \
|
|
echo 'opcache.enable_cli=1'; \
|
|
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
|
|
RUN a2enmod rewrite
|
|
|
|
# PECL extensions
|
|
RUN set -ex \
|
|
&& pecl install APCu-5.1.8 \
|
|
&& pecl install memcached-3.0.2 \
|
|
&& pecl install redis-3.1.1 \
|
|
&& docker-php-ext-enable apcu redis memcached
|
|
RUN a2enmod rewrite
|
|
|
|
CMD ["apache2-foreground"]
|