mirror of
https://github.com/friendica/docker
synced 2025-12-07 13:57:07 +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
|
|
@ -1,4 +1,4 @@
|
|||
FROM php:%%PHP_VERSION%%-%%VARIANT%%
|
||||
FROM php:%%PHP_VERSION%%-%%VARIANT%%-stretch
|
||||
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
|
|
@ -33,8 +33,6 @@ RUN set -ex; \
|
|||
libpng-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libtool \
|
||||
libmcrypt4 \
|
||||
libmcrypt-dev \
|
||||
imagemagick \
|
||||
libmagick++-dev \
|
||||
libmemcached-dev \
|
||||
|
|
@ -44,29 +42,43 @@ RUN set -ex; \
|
|||
librsvg2-2 \
|
||||
libcurl4-openssl-dev \
|
||||
curl \
|
||||
libzip-dev \
|
||||
; \
|
||||
\
|
||||
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 \
|
||||
--with-gd \
|
||||
--enable-gd-native-ttf \
|
||||
--with-freetype-dir=/usr/include/ \
|
||||
--with-png-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 install apcu-%%APCU_VERSION%%; \
|
||||
pecl install memcached-%%MEMCACHED_VERSION%%; \
|
||||
pecl install redis-%%REDIS_VERSION%%; \
|
||||
pecl install imagick-%%IMAGICK_VERSION%%; \
|
||||
\
|
||||
docker-php-ext-enable \
|
||||
apcu \
|
||||
memcached \
|
||||
redis \
|
||||
imagick \
|
||||
; \
|
||||
\
|
||||
# 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; \
|
||||
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
|
||||
|
||||
VOLUME /var/www/html
|
||||
WORKDIR /var/www/html
|
||||
%%VARIANT_EXTRAS%%
|
||||
|
||||
RUN {\
|
||||
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
|
||||
} > /usr/local/etc/php/conf.d/sendmail.ini;
|
||||
|
||||
COPY *.sh upgrade.exclude /
|
||||
RUN chmod +x /*.sh
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue