MAJ en Thelia 2.3.4

This commit is contained in:
2020-05-03 08:14:07 +02:00
parent 72ddf49e60
commit 35a800ca0e
328 changed files with 9560 additions and 14163 deletions

View File

@@ -4,18 +4,26 @@ COPY docker-php-pecl-install /usr/local/bin/
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
openssl \
libpng12-dev \
libicu-dev \
git \
zip \
libzip-dev \
&& docker-php-ext-install intl pdo_mysql mcrypt mbstring zip \
&& docker-php-ext-install intl pdo_mysql openssl mbstring zip calendar \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-pecl-install xdebug-2.3.3
# Setup and install composer
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
&& curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \
&& php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" \
&& php /tmp/composer-setup.php \
&& chmod +x composer.phar \
&& mv composer.phar /usr/local/bin/composer
RUN a2enmod rewrite
RUN usermod -u 1000 www-data
COPY config/php.ini /usr/local/etc/php/
COPY config/vhost/vhost.conf /etc/apache2/sites-enabled/
COPY config/vhost/vhost.conf /etc/apache2/sites-enabled/

48
docker/php/docker-php-pecl-install Normal file → Executable file
View File

@@ -1,34 +1,36 @@
#!/bin/bash
set -e
cd /usr/src/php/ext
usage() {
echo "usage: $0 extension-version [extension-version] ...]"
echo " ie: $0 oauth-1.2.3 uploadprogress-1.0.3.1"
echo "usage: $0 [channel/]<package> ..."
echo " ie: $0 uploadprogress oauth-1.2.3"
}
while [ $# -gt 0 ]; do
ext="$1"
shift
if [ -d "$ext" ]; then
echo >&2 "error: $(pwd -P)/$ext exists already"
echo >&2
if [ $# -eq 0 ]; then
usage >&2
exit 1
fi
exts+=( "$ext" )
done
if [ "${#exts[@]}" -eq 0 ]; then
usage >&2
exit 1
fi
for ext in "${exts[@]}"; do
(
mkdir -p $ext
curl -sSL "http://pecl.php.net/get/$ext" | tar xvz -C "$ext" --strip-components=1
docker-php-ext-install $ext
)
pecl install "$@"
while [ $# -gt 0 ]; do
ext="$1"
ext=$(echo "$ext" | cut -d- -f1)
ext=$(echo "$ext" | cut -d\/ -f2)
shift
for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do
ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini"
if grep -q zend_extension_entry "$module"; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
line="zend_extension=$(readlink -f "$module")"
else
line="extension=$(basename "$module")"
fi
if ! grep -q "$line" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done
done
rm -rf /tmp/*