Estou rodando uma instância que provêm deste Dockerfile.
Aqui tenho parte do meu phpinfo:
Como podemos observar Configuration File (php.ini) Path
está apontando para /usr/local/etc/php
. Este valor foi passado na linha 31 do Dockerfile ENV PHP_INI_DIR /usr/local/etc/php
.
Porém dentro dos meus sub arquivos de /usr/local/etc/ eu não encontro nenhum php.ini
:
Como podemos observar no phpinfo o Loaded Configuration File
está vazio.
Eu não sei de onde está vindo as configurações desta página. De onde está sendo carregado o php.ini?
Também não vejo o service do php para tentar reiniciá-lo:
UPDATE: Eu tenho o php.ini nessa pasta:
Aqui o Dockerfile:
FROM php:5-apache
# Update apt-get
RUN apt-get update
## list of installed library packages only => https://askubuntu.com/questions/434154/how-to-get-the-list-of-installed-library-packages-only
#ldconfig -v # -v it will show the libraries versions
#ldconfig -v | grep libname # Use grep to find a specific library by name.
#RUN /sbin/ldconfig -p
## ListInstalledPackages => https://wiki.debian.org/ListInstalledPackages
#RUN dpkg-query -l
## NOTE:
##need setup php variables date and maxupload file and others variables. ==> https://howto.biapy.com/en/debian-gnu-linux/servers/php/manage-php-ini-options-from-command-line-on-debian
##Install FFmpeg on Debian => https://superuser.com/questions/286675/how-to-install-ffmpeg-on-debian
#https://www.johnvansickle.com/ffmpeg/
## System modules
#RUN apt-get install deb-multimedia-keyring
#RUN apt-get update
#RUN apt-get install -y ffmpeg
## UTILITIES
RUN apt-get install -y vim
#RUN apt-get install -y wget
## APACHE2 basic installation
RUN apachectl -M
RUN a2enmod rewrite
RUN a2enmod expires
RUN service apache2 restart
RUN apachectl -M
################################################
## PHP modules
## Note: when installing from php5 for some modules we need to copy from php5/mods-available to local/etc/php/conf.d and create a simbolic link
RUN php -m
RUN apt-get install -y php5-common
RUN apt-get install -y php-calendar
#RUN cp /etc/php5/mods-available/calendar.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/calendar.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/calendar.so
#RUN docker-php-ext-install calendar
RUN docker-php-ext-install bcmath
RUN apt-get install -y php5-mhash
#RUN cp /etc/php5/mods-available/mhash.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/mhash.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/mhash.so
RUN apt-get install -y php5-intl
RUN cp /etc/php5/mods-available/intl.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/intl.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/intl.so
RUN apt-get install -y php5-mcrypt
RUN cp /etc/php5/mods-available/mcrypt.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/mcrypt.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/mcrypt.so
RUN apt-get install -y php5-redis
RUN cp /etc/php5/mods-available/redis.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/redis.so
RUN apt-get install -y php5-mysql
RUN cp /etc/php5/mods-available/mysql.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/mysql.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/mysql.so
RUN cp /etc/php5/mods-available/opcache.ini /usr/local/etc/php/conf.d
RUN apt-get install -y php5-gd
RUN cp /etc/php5/mods-available/gd.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/gd.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/gd.so
RUN apt-get install -y php5-gdcm
RUN cp /etc/php5/mods-available/gdcm.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/gdcm.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/gdcm.so
RUN apt-get install -y php5-vtkgdcm
RUN cp /etc/php5/mods-available/vtkgdcm.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/vtkgdcm.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/vtkgdcm.so
RUN apt-get install -y php5-ldap
RUN cp /etc/php5/mods-available/ldap.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/ldap.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ldap.so
RUN apt-get install -y php5-xsl
RUN cp /etc/php5/mods-available/xsl.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/xsl.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/xsl.so
RUN apt-get install -y php5-tidy
RUN cp /etc/php5/mods-available/tidy.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/tidy.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/tidy.so
RUN apt-get install -y php5-xmlrpc
RUN cp /etc/php5/mods-available/xmlrpc.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/xmlrpc.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/xmlrpc.so
RUN apt-get install -y php5-pgsql
RUN cp /etc/php5/mods-available/pgsql.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/pgsql.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/pgsql.so
RUN cp /etc/php5/mods-available/mysqli.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/mysqli.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/mysqli.so
RUN cp /etc/php5/mods-available/pdo.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/pdo.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/pdo.so
RUN cp /etc/php5/mods-available/pdo_mysql.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/pdo_mysql.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/pdo_mysql.so
RUN cp /etc/php5/mods-available/pdo_pgsql.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/pdo_pgsql.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/pdo_pgsql.so
RUN cp /etc/php5/mods-available/readline.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/readline.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/readline.so
#RUN apt-get install -y php5-snmp
#RUN cp /etc/php5/mods-available/snmp.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/snmp.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/snmp.so
RUN php -m
## REDIS
RUN apt-get install -y telnet redis-server
RUN apt-get install -y redis-server
RUN apt-get install -y npm
#RUN mkdir /composer-setup && mkdir /usr/local/bin/composer && wget https://getcomposer.org/installer -P /composer-setup && php /composer-setup/installer --install-dir=/usr/local/bin/composer && rm -Rf /composer-setup
################################################
## PHP extra modules
#RUN apt-get install -y php-horde-date-parser ##The command '/bin/sh -c apt-get install -y php-horde-date-parser' returned a non-zero code: 100
#RUN apt-get install -y php-horde-date
#RUN apt-get install -y php-horde-timezone
#RUN apt-get install -y php-horde-timeobjects
#RUN apt-get install -y php-timer
#RUN apt-get install -y php-horde-icalendar
#RUN apt-get install -y php-horde-kronolith
#RUN apt-get install -y php-doctrine-dbal
#RUN apt-get install -y phpldapadmin
#RUN apt-get install -y php-horde-ldap
#RUN apt-get install -y php-net-ldap
#RUN apt-get install -y php-net-ldap2
#RUN apt-get install -y php-mdb2-driver-pgsql
#RUN apt-get install -y libnusoap-php
#RUN apt-get install -y php-soap
#RUN apt-get install -y php-fxsl
#RUN apt-get install -y php-horde-text-filter-csstidy
#RUN apt-get install -y php-pclzip
#RUN apt-get install -y libphp-pclzip
#RUN apt-get update
#RUN cp /etc/php5/mods-available/json.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/json.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/json.so
#Manage PHP ini options from command line on Debian => https://howto.biapy.com/en/debian-gnu-linux/servers/php/manage-php-ini-options-from-command-line-on-debian
#RUN apt-get install -y php5-cli
### Note: Compare content
#PHP5
#cd /usr/local/etc/php/conf.d
#cd /etc/php5/mods-available/
#PHP
#cd /usr/local/lib/php/extensions/no-debug-non-zts-20131226
#cd /usr/lib/php5/20131226/
## Note: when module is php5 need to make it available inside php/extensions (create a simbolic link)
#RUN cp /etc/php5/mods-available/MODULE.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/MODULE.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/MODULE.so
################################################
## WORK DIR
#COPY manyvids/ /var/www/html
#COPY src/ /var/www/html
# CONNECTIONS - PORTS
#EXPOSE 80
#########################################. Extra notes
#CMD ["redis-server"]
## Clean up Docker
#docker rm $(docker ps -a)
#docker rmi $(docker images)
#docker build -t mv1_img .
## RUN REDIS
#Open up another terminal
#docker exec -it xxxxxCOntainerId bash
#root@bxxxxxCOntainerId:/var/www/html# redis-server
#If another terminal is needed to get acces to the container:
#Open up another terminal
#docker exec -it xxxxxCOntainerId bash
## Not found modules. We have it in MAMP instance, not in DOCKER apt php list and not in php -m
#mysqli
#pdo_mysql
#pdo_pgsql
#shmop
#sockets
#sysvmsg
#sysvsem
#sysvshm
#wddx