mirror of
https://github.com/friendica/docker
synced 2024-12-28 08:05:20 +01:00
Enhancing docker images:
- Adding APCu - Bump PHP to 7.3 - Remove deprecated mcrypt - Dynamic version checking for depending PECL libraries - Add production default 512M for memory_limit (see https://github.com/friendica/docker/issues/56) - Re-Add FRIENDICA_PHP_PATH because of Bugfix in upstream
This commit is contained in:
parent
25f988edbe
commit
989de98414
22 changed files with 422 additions and 207 deletions
|
@ -141,8 +141,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
||||||
echo "Installation with environment variables"
|
echo "Installation with environment variables"
|
||||||
|
|
||||||
# TODO Bug in PHP Path for automatic installation
|
FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
||||||
#FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
|
||||||
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
||||||
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
||||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||||
FROM php:7.1-apache
|
FROM php:7.3-apache-stretch
|
||||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||||
|
|
||||||
# entrypoint.sh and cron.sh dependencies
|
# entrypoint.sh and cron.sh dependencies
|
||||||
|
@ -34,8 +34,6 @@ RUN set -ex; \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt4 \
|
|
||||||
libmcrypt-dev \
|
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
|
@ -45,29 +43,43 @@ RUN set -ex; \
|
||||||
librsvg2-2 \
|
librsvg2-2 \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
curl \
|
curl \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
||||||
pecl install imagick-3.4.3; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache \
|
|
||||||
; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
; \
|
; \
|
||||||
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install memcached-3.0.4; \
|
pecl install apcu-5.1.17; \
|
||||||
pecl install redis-3.1.6; \
|
pecl install memcached-3.1.3; \
|
||||||
|
pecl install redis-4.3.0; \
|
||||||
|
pecl install imagick-3.4.4; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
|
@ -84,11 +96,19 @@ RUN set -ex; \
|
||||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN chown -R www-data:root /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
RUN a2enmod rewrite remoteip ;\
|
RUN a2enmod rewrite remoteip ;\
|
||||||
{\
|
{\
|
||||||
|
@ -99,10 +119,6 @@ RUN a2enmod rewrite remoteip ;\
|
||||||
} > /etc/apache2/conf-available/remoteip.conf;\
|
} > /etc/apache2/conf-available/remoteip.conf;\
|
||||||
a2enconf remoteip
|
a2enconf remoteip
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
@ -118,7 +134,8 @@ RUN set -ex; \
|
||||||
chmod 777 /usr/src/friendica/view/smarty3; \
|
chmod 777 /usr/src/friendica/view/smarty3; \
|
||||||
curl -fsSL -o friendica_addons.tar.gz \
|
curl -fsSL -o friendica_addons.tar.gz \
|
||||||
"https://github.com/friendica/friendica-addons/archive/${FRIENDICA_ADDONS}.tar.gz"; \
|
"https://github.com/friendica/friendica-addons/archive/${FRIENDICA_ADDONS}.tar.gz"; \
|
||||||
mkdir /usr/src/friendica/addon; \
|
mkdir -p /usr/src/friendica/proxy; \
|
||||||
|
mkdir -p /usr/src/friendica/addon; \
|
||||||
tar -xzf friendica_addons.tar.gz -C /usr/src/friendica/addon --strip-components=1; \
|
tar -xzf friendica_addons.tar.gz -C /usr/src/friendica/addon --strip-components=1; \
|
||||||
rm friendica_addons.tar.gz; \
|
rm friendica_addons.tar.gz; \
|
||||||
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica;
|
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica;
|
||||||
|
|
|
@ -141,8 +141,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
||||||
echo "Installation with environment variables"
|
echo "Installation with environment variables"
|
||||||
|
|
||||||
# TODO Bug in PHP Path for automatic installation
|
FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
||||||
#FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
|
||||||
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
||||||
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
||||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
|
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
|
||||||
FROM php:7.1-fpm-alpine
|
FROM php:7.3-fpm-alpine
|
||||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||||
|
|
||||||
# entrypoint.sh and cron.sh dependencies
|
# entrypoint.sh and cron.sh dependencies
|
||||||
|
@ -29,8 +29,6 @@ RUN set -ex; \
|
||||||
imagemagick-dev \
|
imagemagick-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt \
|
|
||||||
libmcrypt-dev \
|
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
cyrus-sasl-dev \
|
cyrus-sasl-dev \
|
||||||
freetype \
|
freetype \
|
||||||
|
@ -44,26 +42,42 @@ RUN set -ex; \
|
||||||
rsync \
|
rsync \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
pcre-dev \
|
pcre-dev \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
pecl install imagick-3.4.3; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt; \
|
\
|
||||||
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
|
; \
|
||||||
\
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install memcached-3.0.4; \
|
pecl install APCu-5.1.17; \
|
||||||
pecl install redis-3.1.6; \
|
pecl install memcached-3.1.3; \
|
||||||
|
pecl install redis-4.3.0; \
|
||||||
|
pecl install imagick-3.4.4; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
runDeps="$( \
|
runDeps="$( \
|
||||||
|
@ -75,17 +89,21 @@ RUN set -ex; \
|
||||||
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
||||||
apk del .build-deps;
|
apk del .build-deps;
|
||||||
|
|
||||||
RUN chown -R www-data:www-data /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
@ -101,7 +119,8 @@ RUN set -ex; \
|
||||||
chmod 777 /usr/src/friendica/view/smarty3; \
|
chmod 777 /usr/src/friendica/view/smarty3; \
|
||||||
curl -fsSL -o friendica_addons.tar.gz \
|
curl -fsSL -o friendica_addons.tar.gz \
|
||||||
"https://github.com/friendica/friendica-addons/archive/${FRIENDICA_ADDONS}.tar.gz"; \
|
"https://github.com/friendica/friendica-addons/archive/${FRIENDICA_ADDONS}.tar.gz"; \
|
||||||
mkdir /usr/src/friendica/addon; \
|
mkdir -p /usr/src/friendica/proxy; \
|
||||||
|
mkdir -p /usr/src/friendica/addon; \
|
||||||
tar -xzf friendica_addons.tar.gz -C /usr/src/friendica/addon --strip-components=1; \
|
tar -xzf friendica_addons.tar.gz -C /usr/src/friendica/addon --strip-components=1; \
|
||||||
rm friendica_addons.tar.gz; \
|
rm friendica_addons.tar.gz; \
|
||||||
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica;
|
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica;
|
||||||
|
|
|
@ -141,8 +141,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
||||||
echo "Installation with environment variables"
|
echo "Installation with environment variables"
|
||||||
|
|
||||||
# TODO Bug in PHP Path for automatic installation
|
FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
||||||
#FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
|
||||||
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
||||||
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
||||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||||
FROM php:7.1-fpm
|
FROM php:7.3-fpm-stretch
|
||||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||||
|
|
||||||
# entrypoint.sh and cron.sh dependencies
|
# entrypoint.sh and cron.sh dependencies
|
||||||
|
@ -34,8 +34,6 @@ RUN set -ex; \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt4 \
|
|
||||||
libmcrypt-dev \
|
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
|
@ -45,29 +43,43 @@ RUN set -ex; \
|
||||||
librsvg2-2 \
|
librsvg2-2 \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
curl \
|
curl \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
||||||
pecl install imagick-3.4.3; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache \
|
|
||||||
; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
; \
|
; \
|
||||||
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install memcached-3.0.4; \
|
pecl install apcu-5.1.17; \
|
||||||
pecl install redis-3.1.6; \
|
pecl install memcached-3.1.3; \
|
||||||
|
pecl install redis-4.3.0; \
|
||||||
|
pecl install imagick-3.4.4; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
|
@ -84,17 +96,21 @@ RUN set -ex; \
|
||||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN chown -R www-data:root /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
@ -110,7 +126,8 @@ RUN set -ex; \
|
||||||
chmod 777 /usr/src/friendica/view/smarty3; \
|
chmod 777 /usr/src/friendica/view/smarty3; \
|
||||||
curl -fsSL -o friendica_addons.tar.gz \
|
curl -fsSL -o friendica_addons.tar.gz \
|
||||||
"https://github.com/friendica/friendica-addons/archive/${FRIENDICA_ADDONS}.tar.gz"; \
|
"https://github.com/friendica/friendica-addons/archive/${FRIENDICA_ADDONS}.tar.gz"; \
|
||||||
mkdir /usr/src/friendica/addon; \
|
mkdir -p /usr/src/friendica/proxy; \
|
||||||
|
mkdir -p /usr/src/friendica/addon; \
|
||||||
tar -xzf friendica_addons.tar.gz -C /usr/src/friendica/addon --strip-components=1; \
|
tar -xzf friendica_addons.tar.gz -C /usr/src/friendica/addon --strip-components=1; \
|
||||||
rm friendica_addons.tar.gz; \
|
rm friendica_addons.tar.gz; \
|
||||||
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica;
|
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica;
|
||||||
|
|
|
@ -141,8 +141,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
||||||
echo "Installation with environment variables"
|
echo "Installation with environment variables"
|
||||||
|
|
||||||
# TODO Bug in PHP Path for automatic installation
|
FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
||||||
#FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
|
||||||
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
||||||
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
||||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||||
FROM php:7.1-apache
|
FROM php:7.3-apache-stretch
|
||||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||||
|
|
||||||
# entrypoint.sh and cron.sh dependencies
|
# entrypoint.sh and cron.sh dependencies
|
||||||
|
@ -34,8 +34,6 @@ RUN set -ex; \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt4 \
|
|
||||||
libmcrypt-dev \
|
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
|
@ -45,29 +43,43 @@ RUN set -ex; \
|
||||||
librsvg2-2 \
|
librsvg2-2 \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
curl \
|
curl \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
||||||
pecl install imagick-3.4.3; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache \
|
|
||||||
; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
; \
|
; \
|
||||||
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install memcached-3.0.4; \
|
pecl install apcu-5.1.17; \
|
||||||
pecl install redis-3.1.6; \
|
pecl install memcached-3.1.3; \
|
||||||
|
pecl install redis-4.3.0; \
|
||||||
|
pecl install imagick-3.4.4; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
|
@ -84,11 +96,19 @@ RUN set -ex; \
|
||||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN chown -R www-data:root /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
RUN a2enmod rewrite remoteip ;\
|
RUN a2enmod rewrite remoteip ;\
|
||||||
{\
|
{\
|
||||||
|
@ -99,10 +119,6 @@ RUN a2enmod rewrite remoteip ;\
|
||||||
} > /etc/apache2/conf-available/remoteip.conf;\
|
} > /etc/apache2/conf-available/remoteip.conf;\
|
||||||
a2enconf remoteip
|
a2enconf remoteip
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
||||||
echo "Installation with environment variables"
|
echo "Installation with environment variables"
|
||||||
|
|
||||||
# TODO Bug in PHP Path for automatic installation
|
FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
||||||
#FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
|
||||||
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
||||||
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
||||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
|
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
|
||||||
FROM php:7.1-fpm-alpine
|
FROM php:7.3-fpm-alpine
|
||||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||||
|
|
||||||
# entrypoint.sh and cron.sh dependencies
|
# entrypoint.sh and cron.sh dependencies
|
||||||
|
@ -29,8 +29,6 @@ RUN set -ex; \
|
||||||
imagemagick-dev \
|
imagemagick-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt \
|
|
||||||
libmcrypt-dev \
|
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
cyrus-sasl-dev \
|
cyrus-sasl-dev \
|
||||||
freetype \
|
freetype \
|
||||||
|
@ -44,26 +42,42 @@ RUN set -ex; \
|
||||||
rsync \
|
rsync \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
pcre-dev \
|
pcre-dev \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
pecl install imagick-3.4.3; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt; \
|
\
|
||||||
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
|
; \
|
||||||
\
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install memcached-3.0.4; \
|
pecl install APCu-5.1.17; \
|
||||||
pecl install redis-3.1.6; \
|
pecl install memcached-3.1.3; \
|
||||||
|
pecl install redis-4.3.0; \
|
||||||
|
pecl install imagick-3.4.4; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
runDeps="$( \
|
runDeps="$( \
|
||||||
|
@ -75,17 +89,21 @@ RUN set -ex; \
|
||||||
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
||||||
apk del .build-deps;
|
apk del .build-deps;
|
||||||
|
|
||||||
RUN chown -R www-data:www-data /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
||||||
echo "Installation with environment variables"
|
echo "Installation with environment variables"
|
||||||
|
|
||||||
# TODO Bug in PHP Path for automatic installation
|
FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
||||||
#FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
|
||||||
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
||||||
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
||||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||||
FROM php:7.1-fpm
|
FROM php:7.3-fpm-stretch
|
||||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||||
|
|
||||||
# entrypoint.sh and cron.sh dependencies
|
# entrypoint.sh and cron.sh dependencies
|
||||||
|
@ -34,8 +34,6 @@ RUN set -ex; \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt4 \
|
|
||||||
libmcrypt-dev \
|
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
|
@ -45,29 +43,43 @@ RUN set -ex; \
|
||||||
librsvg2-2 \
|
librsvg2-2 \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
curl \
|
curl \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
||||||
pecl install imagick-3.4.3; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache \
|
|
||||||
; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
; \
|
; \
|
||||||
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install memcached-3.0.4; \
|
pecl install apcu-5.1.17; \
|
||||||
pecl install redis-3.1.6; \
|
pecl install memcached-3.1.3; \
|
||||||
|
pecl install redis-4.3.0; \
|
||||||
|
pecl install imagick-3.4.4; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
|
@ -84,17 +96,21 @@ RUN set -ex; \
|
||||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN chown -R www-data:root /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
||||||
echo "Installation with environment variables"
|
echo "Installation with environment variables"
|
||||||
|
|
||||||
# TODO Bug in PHP Path for automatic installation
|
FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
||||||
#FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
|
||||||
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
||||||
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
||||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||||
FROM php:7.1-apache
|
FROM php:7.3-apache-stretch
|
||||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||||
|
|
||||||
# entrypoint.sh and cron.sh dependencies
|
# entrypoint.sh and cron.sh dependencies
|
||||||
|
@ -34,8 +34,6 @@ RUN set -ex; \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt4 \
|
|
||||||
libmcrypt-dev \
|
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
|
@ -45,29 +43,43 @@ RUN set -ex; \
|
||||||
librsvg2-2 \
|
librsvg2-2 \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
curl \
|
curl \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
||||||
pecl install imagick-3.4.3; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache \
|
|
||||||
; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
; \
|
; \
|
||||||
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install memcached-3.0.4; \
|
pecl install apcu-5.1.17; \
|
||||||
pecl install redis-3.1.6; \
|
pecl install memcached-3.1.3; \
|
||||||
|
pecl install redis-4.3.0; \
|
||||||
|
pecl install imagick-3.4.4; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
|
@ -84,11 +96,19 @@ RUN set -ex; \
|
||||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN chown -R www-data:root /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
RUN a2enmod rewrite remoteip ;\
|
RUN a2enmod rewrite remoteip ;\
|
||||||
{\
|
{\
|
||||||
|
@ -99,10 +119,6 @@ RUN a2enmod rewrite remoteip ;\
|
||||||
} > /etc/apache2/conf-available/remoteip.conf;\
|
} > /etc/apache2/conf-available/remoteip.conf;\
|
||||||
a2enconf remoteip
|
a2enconf remoteip
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
||||||
echo "Installation with environment variables"
|
echo "Installation with environment variables"
|
||||||
|
|
||||||
# TODO Bug in PHP Path for automatic installation
|
FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
||||||
#FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
|
||||||
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
||||||
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
||||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
|
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
|
||||||
FROM php:7.1-fpm-alpine
|
FROM php:7.3-fpm-alpine
|
||||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||||
|
|
||||||
# entrypoint.sh and cron.sh dependencies
|
# entrypoint.sh and cron.sh dependencies
|
||||||
|
@ -29,8 +29,6 @@ RUN set -ex; \
|
||||||
imagemagick-dev \
|
imagemagick-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt \
|
|
||||||
libmcrypt-dev \
|
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
cyrus-sasl-dev \
|
cyrus-sasl-dev \
|
||||||
freetype \
|
freetype \
|
||||||
|
@ -44,26 +42,42 @@ RUN set -ex; \
|
||||||
rsync \
|
rsync \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
pcre-dev \
|
pcre-dev \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
pecl install imagick-3.4.3; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt; \
|
\
|
||||||
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
|
; \
|
||||||
\
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install memcached-3.0.4; \
|
pecl install APCu-5.1.17; \
|
||||||
pecl install redis-3.1.6; \
|
pecl install memcached-3.1.3; \
|
||||||
|
pecl install redis-4.3.0; \
|
||||||
|
pecl install imagick-3.4.4; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
runDeps="$( \
|
runDeps="$( \
|
||||||
|
@ -75,17 +89,21 @@ RUN set -ex; \
|
||||||
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
||||||
apk del .build-deps;
|
apk del .build-deps;
|
||||||
|
|
||||||
RUN chown -R www-data:www-data /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
||||||
echo "Installation with environment variables"
|
echo "Installation with environment variables"
|
||||||
|
|
||||||
# TODO Bug in PHP Path for automatic installation
|
FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
||||||
#FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
|
||||||
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
||||||
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
||||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||||
FROM php:7.1-fpm
|
FROM php:7.3-fpm-stretch
|
||||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||||
|
|
||||||
# entrypoint.sh and cron.sh dependencies
|
# entrypoint.sh and cron.sh dependencies
|
||||||
|
@ -34,8 +34,6 @@ RUN set -ex; \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt4 \
|
|
||||||
libmcrypt-dev \
|
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
|
@ -45,29 +43,43 @@ RUN set -ex; \
|
||||||
librsvg2-2 \
|
librsvg2-2 \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
curl \
|
curl \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
||||||
pecl install imagick-3.4.3; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache \
|
|
||||||
; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
; \
|
; \
|
||||||
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install memcached-3.0.4; \
|
pecl install apcu-5.1.17; \
|
||||||
pecl install redis-3.1.6; \
|
pecl install memcached-3.1.3; \
|
||||||
|
pecl install redis-4.3.0; \
|
||||||
|
pecl install imagick-3.4.4; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
|
@ -84,17 +96,21 @@ RUN set -ex; \
|
||||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN chown -R www-data:root /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
if [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ] && [ -n "${MYSQL_USER+x}" -o -n "${MYSQL_USERNAME+x}" ] && [ -n ${FRIENDICA_ADMIN_MAIL+x} ]; then
|
||||||
echo "Installation with environment variables"
|
echo "Installation with environment variables"
|
||||||
|
|
||||||
# TODO Bug in PHP Path for automatic installation
|
FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
||||||
#FRIENDICA_PHP_PATH=${FRIENDICA_PHP_PATH:-/usr/local/php}
|
|
||||||
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
FRIENDICA_TZ=${FRIENDICA_TZ:-America/LosAngeles}
|
||||||
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
FRIENDICA_LANG=${FRIENDICA_LANG:-en}
|
||||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||||
|
|
|
@ -28,8 +28,6 @@ RUN set -ex; \
|
||||||
imagemagick-dev \
|
imagemagick-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt \
|
|
||||||
libmcrypt-dev \
|
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
cyrus-sasl-dev \
|
cyrus-sasl-dev \
|
||||||
freetype \
|
freetype \
|
||||||
|
@ -43,26 +41,42 @@ RUN set -ex; \
|
||||||
rsync \
|
rsync \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
pcre-dev \
|
pcre-dev \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
pecl install imagick-%%IMAGICK_VERSION%%; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt; \
|
\
|
||||||
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
|
; \
|
||||||
\
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
|
pecl install APCu-%%APCU_VERSION%%; \
|
||||||
pecl install memcached-%%MEMCACHED_VERSION%%; \
|
pecl install memcached-%%MEMCACHED_VERSION%%; \
|
||||||
pecl install redis-%%REDIS_VERSION%%; \
|
pecl install redis-%%REDIS_VERSION%%; \
|
||||||
|
pecl install imagick-%%IMAGICK_VERSION%%; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
runDeps="$( \
|
runDeps="$( \
|
||||||
|
@ -74,17 +88,21 @@ RUN set -ex; \
|
||||||
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
||||||
apk del .build-deps;
|
apk del .build-deps;
|
||||||
|
|
||||||
RUN chown -R www-data:www-data /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
%%VARIANT_EXTRAS%%
|
%%VARIANT_EXTRAS%%
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM php:%%PHP_VERSION%%-%%VARIANT%%
|
FROM php:%%PHP_VERSION%%-%%VARIANT%%-stretch
|
||||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||||
|
|
||||||
# entrypoint.sh and cron.sh dependencies
|
# entrypoint.sh and cron.sh dependencies
|
||||||
|
@ -33,8 +33,6 @@ RUN set -ex; \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt4 \
|
|
||||||
libmcrypt-dev \
|
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
|
@ -44,29 +42,43 @@ RUN set -ex; \
|
||||||
librsvg2-2 \
|
librsvg2-2 \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
curl \
|
curl \
|
||||||
|
libzip-dev \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
||||||
pecl install imagick-%%IMAGICK_VERSION%%; \
|
\
|
||||||
docker-php-ext-enable imagick; \
|
|
||||||
pecl clear-cache \
|
|
||||||
; \
|
|
||||||
docker-php-ext-configure gd \
|
docker-php-ext-configure gd \
|
||||||
--with-gd \
|
--with-gd \
|
||||||
--enable-gd-native-ttf \
|
|
||||||
--with-freetype-dir=/usr/include/ \
|
--with-freetype-dir=/usr/include/ \
|
||||||
--with-png-dir=/usr/include/ \
|
--with-png-dir=/usr/include/ \
|
||||||
--with-jpeg-dir=/usr/include/ \
|
--with-jpeg-dir=/usr/include/ \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 \
|
||||||
|
curl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
xml \
|
||||||
|
gd \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
mbstring \
|
||||||
|
posix \
|
||||||
|
ctype \
|
||||||
|
json \
|
||||||
|
iconv \
|
||||||
; \
|
; \
|
||||||
|
\
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
|
pecl install apcu-%%APCU_VERSION%%; \
|
||||||
pecl install memcached-%%MEMCACHED_VERSION%%; \
|
pecl install memcached-%%MEMCACHED_VERSION%%; \
|
||||||
pecl install redis-%%REDIS_VERSION%%; \
|
pecl install redis-%%REDIS_VERSION%%; \
|
||||||
|
pecl install imagick-%%IMAGICK_VERSION%%; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
apcu \
|
||||||
memcached \
|
memcached \
|
||||||
redis \
|
redis \
|
||||||
|
imagick \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
|
@ -83,17 +95,21 @@ RUN set -ex; \
|
||||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN chown -R www-data:root /var/www; \
|
RUN {\
|
||||||
|
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||||
|
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||||
|
\
|
||||||
|
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
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
WORKDIR /var/www/html
|
|
||||||
%%VARIANT_EXTRAS%%
|
%%VARIANT_EXTRAS%%
|
||||||
|
|
||||||
RUN {\
|
|
||||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
|
||||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
|
||||||
|
|
||||||
COPY *.sh upgrade.exclude /
|
COPY *.sh upgrade.exclude /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
|
50
update.sh
50
update.sh
|
@ -2,7 +2,7 @@
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
declare -A php_version=(
|
declare -A php_version=(
|
||||||
[default]='7.1'
|
[default]='7.3'
|
||||||
)
|
)
|
||||||
|
|
||||||
declare -A cmd=(
|
declare -A cmd=(
|
||||||
|
@ -23,14 +23,51 @@ declare -A extras=(
|
||||||
[fpm-alpine]=''
|
[fpm-alpine]=''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
apcu_version="$(
|
||||||
|
git ls-remote --tags https://github.com/krakjoe/apcu.git \
|
||||||
|
| cut -d/ -f3 \
|
||||||
|
| grep -vE -- '-rc|-b' \
|
||||||
|
| sed -E 's/^v//' \
|
||||||
|
| sort -V \
|
||||||
|
| tail -1
|
||||||
|
)"
|
||||||
|
|
||||||
|
memcached_version="$(
|
||||||
|
git ls-remote --tags https://github.com/php-memcached-dev/php-memcached.git \
|
||||||
|
| cut -d/ -f3 \
|
||||||
|
| grep -vE -- '-rc|-b' \
|
||||||
|
| sed -E 's/^[rv]//' \
|
||||||
|
| sort -V \
|
||||||
|
| tail -1
|
||||||
|
)"
|
||||||
|
|
||||||
|
redis_version="$(
|
||||||
|
git ls-remote --tags https://github.com/phpredis/phpredis.git \
|
||||||
|
| cut -d/ -f3 \
|
||||||
|
| grep -viE '[a-z]' \
|
||||||
|
| tr -d '^{}' \
|
||||||
|
| sort -V \
|
||||||
|
| tail -1
|
||||||
|
)"
|
||||||
|
|
||||||
|
imagick_version="$(
|
||||||
|
git ls-remote --tags https://github.com/mkoppanen/imagick.git \
|
||||||
|
| cut -d/ -f3 \
|
||||||
|
| grep -viE '[a-z]' \
|
||||||
|
| tr -d '^{}' \
|
||||||
|
| sort -V \
|
||||||
|
| tail -1
|
||||||
|
)"
|
||||||
|
|
||||||
declare -A pecl_versions=(
|
declare -A pecl_versions=(
|
||||||
[Imagick]='3.4.3'
|
[APCu]="$apcu_version"
|
||||||
[memcached]='3.0.4'
|
[memcached]="$memcached_version"
|
||||||
[redis]='3.1.6'
|
[redis]="$redis_version"
|
||||||
|
[imagick]="$imagick_version"
|
||||||
)
|
)
|
||||||
|
|
||||||
declare -A install_extras=(
|
declare -A install_extras=(
|
||||||
['stable']='\nRUN set -ex; \\\n curl -fsSL -o friendica.tar.gz \\\n "https://github.com/friendica/friendica/archive/${FRIENDICA_VERSION}.tar.gz"; \\\n tar -xzf friendica.tar.gz -C /usr/src/; \\\n rm friendica.tar.gz; \\\n mv -f /usr/src/friendica-${FRIENDICA_VERSION}/ /usr/src/friendica; \\\n chmod 777 /usr/src/friendica/view/smarty3; \\\n curl -fsSL -o friendica_addons.tar.gz \\\n "https://github.com/friendica/friendica-addons/archive/${FRIENDICA_ADDONS}.tar.gz"; \\\n mkdir /usr/src/friendica/addon; \\\n tar -xzf friendica_addons.tar.gz -C /usr/src/friendica/addon --strip-components=1; \\\n rm friendica_addons.tar.gz; \\\n /usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica;'
|
['stable']='\nRUN set -ex; \\\n curl -fsSL -o friendica.tar.gz \\\n "https://github.com/friendica/friendica/archive/${FRIENDICA_VERSION}.tar.gz"; \\\n tar -xzf friendica.tar.gz -C /usr/src/; \\\n rm friendica.tar.gz; \\\n mv -f /usr/src/friendica-${FRIENDICA_VERSION}/ /usr/src/friendica; \\\n chmod 777 /usr/src/friendica/view/smarty3; \\\n curl -fsSL -o friendica_addons.tar.gz \\\n "https://github.com/friendica/friendica-addons/archive/${FRIENDICA_ADDONS}.tar.gz"; \\\n mkdir -p /usr/src/friendica/proxy; \\\n mkdir -p /usr/src/friendica/addon; \\\n tar -xzf friendica_addons.tar.gz -C /usr/src/friendica/addon --strip-components=1; \\\n rm friendica_addons.tar.gz; \\\n /usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica;'
|
||||||
['develop']=''
|
['develop']=''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -76,7 +113,8 @@ function create_variant() {
|
||||||
s/%%CMD%%/'"${cmd[$variant]}"'/g;
|
s/%%CMD%%/'"${cmd[$variant]}"'/g;
|
||||||
s|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|g;
|
s|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|g;
|
||||||
s|%%INSTALL_EXTRAS%%|'"${install_extras[$install_type]}"'|g;
|
s|%%INSTALL_EXTRAS%%|'"${install_extras[$install_type]}"'|g;
|
||||||
s/%%IMAGICK_VERSION%%/'"${pecl_versions[Imagick]}"'/g;
|
s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/g;
|
||||||
|
s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g;
|
||||||
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
|
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
|
||||||
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
|
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
|
||||||
' "$dir/Dockerfile"
|
' "$dir/Dockerfile"
|
||||||
|
|
Loading…
Reference in a new issue