Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions 13.0/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html

RUN a2enmod rewrite remoteip ;\
Expand Down
3 changes: 3 additions & 0 deletions 13.0/apache/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run_as() {
fi
}

# Update PHP's memory limit based on environment variable specified to Docker
echo "memory_limit=$PHP_MEMORY_LIMIT" > /usr/local/etc/php/conf.d/memory-limit.ini

if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
Expand Down
9 changes: 7 additions & 2 deletions 13.0/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html


Expand Down
3 changes: 3 additions & 0 deletions 13.0/fpm-alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run_as() {
fi
}

# Update PHP's memory limit based on environment variable specified to Docker
echo "memory_limit=$PHP_MEMORY_LIMIT" > /usr/local/etc/php/conf.d/memory-limit.ini

if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
Expand Down
9 changes: 7 additions & 2 deletions 13.0/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html


Expand Down
3 changes: 3 additions & 0 deletions 13.0/fpm/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run_as() {
fi
}

# Update PHP's memory limit based on environment variable specified to Docker
echo "memory_limit=$PHP_MEMORY_LIMIT" > /usr/local/etc/php/conf.d/memory-limit.ini

if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
Expand Down
9 changes: 7 additions & 2 deletions 14.0/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html

RUN a2enmod rewrite remoteip ;\
Expand Down
3 changes: 3 additions & 0 deletions 14.0/apache/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run_as() {
fi
}

# Update PHP's memory limit based on environment variable specified to Docker
echo "memory_limit=$PHP_MEMORY_LIMIT" > /usr/local/etc/php/conf.d/memory-limit.ini

if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
Expand Down
9 changes: 7 additions & 2 deletions 14.0/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html


Expand Down
3 changes: 3 additions & 0 deletions 14.0/fpm-alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run_as() {
fi
}

# Update PHP's memory limit based on environment variable specified to Docker
echo "memory_limit=$PHP_MEMORY_LIMIT" > /usr/local/etc/php/conf.d/memory-limit.ini

if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
Expand Down
9 changes: 7 additions & 2 deletions 14.0/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html


Expand Down
3 changes: 3 additions & 0 deletions 14.0/fpm/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run_as() {
fi
}

# Update PHP's memory limit based on environment variable specified to Docker
echo "memory_limit=$PHP_MEMORY_LIMIT" > /usr/local/etc/php/conf.d/memory-limit.ini

if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
Expand Down
9 changes: 7 additions & 2 deletions 15.0/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html

RUN a2enmod rewrite remoteip ;\
Expand Down
3 changes: 3 additions & 0 deletions 15.0/apache/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run_as() {
fi
}

# Update PHP's memory limit based on environment variable specified to Docker
echo "memory_limit=$PHP_MEMORY_LIMIT" > /usr/local/etc/php/conf.d/memory-limit.ini

if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
Expand Down
9 changes: 7 additions & 2 deletions 15.0/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html


Expand Down
3 changes: 3 additions & 0 deletions 15.0/fpm-alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run_as() {
fi
}

# Update PHP's memory limit based on environment variable specified to Docker
echo "memory_limit=$PHP_MEMORY_LIMIT" > /usr/local/etc/php/conf.d/memory-limit.ini

if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
Expand Down
9 changes: 7 additions & 2 deletions 15.0/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html


Expand Down
3 changes: 3 additions & 0 deletions 15.0/fpm/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run_as() {
fi
}

# Update PHP's memory limit based on environment variable specified to Docker
echo "memory_limit=$PHP_MEMORY_LIMIT" > /usr/local/etc/php/conf.d/memory-limit.ini

if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
Expand Down
9 changes: 7 additions & 2 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html
%%VARIANT_EXTRAS%%

Expand Down
9 changes: 7 additions & 2 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,17 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

# Allow PHP memory_limit to be configurable. Touch the INI file and give open permissions so that
# the entrypoint script can modify it when the container is run by non-root users.
ENV PHP_MEMORY_LIMIT=512M
RUN true \
&& ini_file=/usr/local/etc/php/conf.d/memory-limit.ini \
&& touch "$ini_file" && chmod a+rw "$ini_file"

VOLUME /var/www/html
%%VARIANT_EXTRAS%%

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ The install and update script is only triggered when a default command is used (

- `NEXTCLOUD_UPDATE` (default: _0_)

The PHP `memory_limit` setting can be controlled by specifying the below environment variable.

- `PHP_MEMORY_LIMIT` (default: `512M`)

# Running this image with docker-compose
The easiest way to get a fully featured and functional setup is using a `docker-compose` file. There are too many different possibilities to setup your system, so here are only some examples what you have to look for.
Expand Down
3 changes: 3 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run_as() {
fi
}

# Update PHP's memory limit based on environment variable specified to Docker
echo "memory_limit=$PHP_MEMORY_LIMIT" > /usr/local/etc/php/conf.d/memory-limit.ini

if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
Expand Down