summaryrefslogtreecommitdiffstats
path: root/php-7.4-opt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--php-7.4-opt/TODO.md6
-rw-r--r--php-7.4-opt/build.Dockerfile34
2 files changed, 27 insertions, 13 deletions
diff --git a/php-7.4-opt/TODO.md b/php-7.4-opt/TODO.md
index 5dcaa22..7e03426 100644
--- a/php-7.4-opt/TODO.md
+++ b/php-7.4-opt/TODO.md
@@ -1,11 +1,5 @@
## ToDo
-- add config files
- - php.ini
- - modules
- - imagick
- - apcu
- - checkinstall --include ?
- correct depencies in .deb files
- checkinstall --provides
- checkinstall --requires
diff --git a/php-7.4-opt/build.Dockerfile b/php-7.4-opt/build.Dockerfile
index 8d0eeec..612b8cf 100644
--- a/php-7.4-opt/build.Dockerfile
+++ b/php-7.4-opt/build.Dockerfile
@@ -1,6 +1,7 @@
FROM debian/eol:wheezy
-ENV MAIN_PREFIX /opt/php-7.4
+ENV MAIN_PREFIX_NO_ROOT opt/php-7.4
+ENV MAIN_PREFIX /$MAIN_PREFIX_NO_ROOT
ENV DEP_PREFIX $MAIN_PREFIX/dependencies
ENV PACKAGE_NAME php-7.4.12-opt
@@ -138,22 +139,41 @@ RUN cd php-7.4.12 \
--with-xsl \
--with-zip \
--with-zlib \
- && make \
- && checkinstall -y --pkgname $PACKAGE_NAME
+ && make
+RUN cd php-7.4.12 \
+ && mkdir -p $MAIN_PREFIX_NO_ROOT/etc/conf.d \
+ && cp php.ini-production $MAIN_PREFIX_NO_ROOT/etc/php.ini \
+ && sed -i -E 's/^short_open_tag =.+$/short_open_tag = On/' $MAIN_PREFIX_NO_ROOT/etc/php.ini \
+ && sed -i -E 's/^expose_php =.+$/expose_php = Off/' $MAIN_PREFIX_NO_ROOT/etc/php.ini \
+ && sed -i -E 's/^memory_limit =.+$/memory_limit = 256M/' $MAIN_PREFIX_NO_ROOT/etc/php.ini \
+ && sed -i -E 's/^;?date\.timezone =.*$/date.timezone = Europe\/Berlin/' $MAIN_PREFIX_NO_ROOT/etc/php.ini \
+ && sed -i -E 's/^mail\.add_x_header =.+$/mail.add_x_header = On/' $MAIN_PREFIX_NO_ROOT/etc/php.ini \
+ && echo zend_extension=opcache.so > $MAIN_PREFIX_NO_ROOT/etc/conf.d/opcache.ini \
+ && echo $MAIN_PREFIX_NO_ROOT/etc/php.ini >> files_to_add \
+ && echo $MAIN_PREFIX_NO_ROOT/etc/conf.d/opcache.ini >> files_to_add \
+ && checkinstall -y --pkgname $PACKAGE_NAME --include files_to_add
RUN cd /php-7.4.12/ext \
&& wget https://github.com/Imagick/imagick/archive/3.4.4.tar.gz \
&& tar xzf 3.4.4.tar.gz \
&& cd imagick-3.4.4 \
&& $MAIN_PREFIX/bin/phpize \
&& ./configure --with-php-config=$MAIN_PREFIX/bin/php-config \
- && make \
- && checkinstall -y --pkgname $PACKAGE_NAME-imagick
+ && make
+RUN cd /php-7.4.12/ext/imagick-3.4.4 \
+ && mkdir -p $MAIN_PREFIX_NO_ROOT/etc/conf.d \
+ && echo extension=imagick.so > $MAIN_PREFIX_NO_ROOT/etc/conf.d/imagick.ini \
+ && echo $MAIN_PREFIX_NO_ROOT/etc/conf.d/imagick.ini >> files_to_add \
+ && checkinstall -y --pkgname $PACKAGE_NAME-imagick --include files_to_add
RUN cd /php-7.4.12/ext \
&& wget https://github.com/krakjoe/apcu/archive/v5.1.19.tar.gz \
&& tar xzf v5.1.19.tar.gz \
&& cd apcu-5.1.19 \
&& $MAIN_PREFIX/bin/phpize \
&& ./configure --with-php-config=$MAIN_PREFIX/bin/php-config \
- && make \
- && checkinstall -y --pkgname $PACKAGE_NAME-apcu
+ && make
+RUN cd /php-7.4.12/ext/apcu-5.1.19 \
+ && mkdir -p $MAIN_PREFIX_NO_ROOT/etc/conf.d \
+ && echo extension=apcu.so > $MAIN_PREFIX_NO_ROOT/etc/conf.d/apcu.ini \
+ && echo $MAIN_PREFIX_NO_ROOT/etc/conf.d/apcu.ini >> files_to_add \
+ && checkinstall -y --pkgname $PACKAGE_NAME-apcu --include files_to_add