This developer needed to turn back the clock in the PHP-FPM container, you will not believe what he did next! (#1675)

* Added documentation for installing libfaketime in the php-fpm container
* Enabled installing and using libfaketime system-wide inside the php-fpm container
This commit is contained in:
Youri Westerman
2018-08-21 12:41:34 +07:00
committed by Shao Yu-Lung (Allen)
parent 1b865dd153
commit 89051de67d
4 changed files with 45 additions and 0 deletions

View File

@ -485,6 +485,18 @@ RUN if [ ${INSTALL_CALENDAR} = true ]; then \
docker-php-ext-install calendar \
;fi
###########################################################################
# libfaketime:
###########################################################################
USER root
ARG INSTALL_FAKETIME=false
RUN if [ ${INSTALL_FAKETIME} = true ]; then \
apt-get install -y libfaketime \
;fi
###########################################################################
# Check PHP version:
###########################################################################
@ -509,6 +521,12 @@ RUN apt-get clean && \
RUN usermod -u 1000 www-data
# Adding the faketime library to the preload file needs to be done last
# otherwise it will preload it for all commands that follow in this file
RUN if [ ${INSTALL_FAKETIME} = true ]; then \
echo "/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1" > /etc/ld.so.preload \
;fi
WORKDIR /var/www
CMD ["php-fpm"]