devilbox / docker-php-fpm Goto Github PK
View Code? Open in Web Editor NEWDevilbox's PHP-FPM Docker Images
Home Page: http://devilbox.org
License: MIT License
Devilbox's PHP-FPM Docker Images
Home Page: http://devilbox.org
License: MIT License
Hello Cytopia,
Now the PHP 8.0 stable version was released, could you use the official docker image rather than your own copy ?
Thanks
https://github.com/devilbox/docker-php-fpm/blob/master/Dockerfiles/base/Dockerfile-8.0#L2
regardless of ENABLE_MAIL is set, I can not send an email by php's mail function to my real email box. How can I do this?
In order to ensure that CI does not get stuck on docker push in the final step, one probably has to loop over pushing until success.
Please.
Hello,
I need some help from you guys.
I'm trying to integrate Mailhog and I can't get emails to arrive correctly in Mailhog.
I can't find a suitable example setup either.
here is my docker-compose.yml:
version: "3.8"
services:
# https://github.com/devilbox/docker-php-fpm#php-default-configuration
php:
image: devilbox/php-fpm:7.4-prod
volumes:
- ./var/shared:/shared/httpd
- ./var/www/:/var/www/default/
- ./config/php:/etc/php-custom.d
- ./var/mail:/var/mail
environment:
- ENABLE_MAIL=2
links:
- mailcatcher:1025
- mysql:mysql
networks:
- backend
- proxy
depends_on:
- mailcatcher
# https://hub.docker.com/r/devilbox/apache-2.4
apache:
image: devilbox/apache-2.4:latest
environment:
- PHP_FPM_ENABLE=1
- PHP_FPM_SERVER_ADDR=php
- PHP_FPM_SERVER_PORT=9000
- VIRTUAL_HOST=${VIRTUAL_HOST}
- VIRTUAL_PORT=80
- POSTFIX_RELAYHOST=[mailcatcher]:1025
volumes:
- ./var/shared:/shared/httpd
- ./var/www/:/var/www/default/
- ./config/apache:/etc/httpd-custom.d
expose:
- 80
- 443
ports:
- 8080:80
- 8443:443
links:
- php:php
- mysql:mysql
- mailcatcher:1025
networks:
- backend
- proxy
depends_on:
- php
- mailcatcher
# https://hub.docker.com/_/mysql
mysql:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=test
- MYSQL_USER=admin
- MYSQL_PASSWORD=admin
- MYSQL_DATABASE=E_Nummer
- TZ=Europe/Berlin
ports:
- '3306:3306'
volumes:
- mysql:/var/lib/mysql
- ./dump:/docker-entrypoint-initdb.d/
- ./config/mysql/:/etc/mysql/conf.d/
command: 'mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci --sql-mode="" --default-authentication-plugin=mysql_native_password'
networks:
- backend
- proxy
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
adminer:
image: adminer
restart: on-failure
environment:
- VIRTUAL_HOST=adminer.${VIRTUAL_HOST}
- LETSENCRYPT_HOST=adminer.${VIRTUAL_HOST}
- VIRTUAL_PORT=8080
expose:
- 8080
depends_on:
- mysql
networks:
- proxy
- backend
links:
- mysql:mysql
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
mailcatcher:
image: mailhog/mailhog
environment:
- VIRTUAL_HOST=mail.${VIRTUAL_HOST}
- VIRTUAL_PORT=8025
expose:
- 8025
- 1025
ports:
- "1025:1025"
- "8025:8025"
networks:
- proxy
- backend
volumes:
mysql:
networks:
default:
backend:
proxy:
external: true
Here is my php.ini:
expose_php = off
max_execution_time = 360
max_input_time = 360
memory_limit = 256M
upload_max_filesize = 1G
post_max_size = 1G
opcache.enable = 1
opcache.revalidate_freq = 2
opcache.validate_timestamps = 1
opcache.interned_strings_buffer = 32
opcache.memory_consumption = 256
[mail function]
SMTP = mailcatcher
smtp_port = 1025
mail.add_x_header = On
mail.log = /var/mail/mail.log
[Xdebug]
xdebug.enable = 1
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.default_enable=0
xdebug.remote_host=host.docker.internal
xdebug.remote_port=9000
xdebug.remote_connect_back=0
xdebug.profiler_enable=0
xdebug.remote_log="/tmp/xdebug.log"
Issue ported from: cytopia/devilbox#235
Wondering if its possible to easily add support for PHP 5.2.17?
Add wordmove to the container
Hello @cytopia
New images 5.5 to 7.4 are not available since 28 days now !
Hope you've noticed it, otherwise it's just a reminder
Hello Cytopia,
When we want to know where *.ini files loaded from, we have many solutions.
In CLI version, the more easy is to execute following command:
php --ini
And look line begining with Configuration File (php.ini) Path:
In php script, we have to use the PHP's get_cfg_var function with the cfg_file_path
argument.
On my Windows 10 Laptop with WSL2 and Ubuntu 16.04 distribution, I got
llaville@LAPTOP-7JMHIOJJ:~/.devilbox$ php -r "echo get_cfg_var('cfg_file_path'), PHP_EOL;"
/etc/php/7.2/cli/php.ini
llaville@LAPTOP-7JMHIOJJ:~/.devilbox$ php --ini
Configuration File (php.ini) Path: /etc/php/7.2/cli
Loaded Configuration File: /etc/php/7.2/cli/php.ini
Scan for additional .ini files in: /etc/php/7.2/cli/conf.d
Additional .ini files parsed: /etc/php/7.2/cli/conf.d/10-opcache.ini,
/etc/php/7.2/cli/conf.d/10-pdo.ini,
/etc/php/7.2/cli/conf.d/20-calendar.ini,
/etc/php/7.2/cli/conf.d/20-ctype.ini,
/etc/php/7.2/cli/conf.d/20-exif.ini,
/etc/php/7.2/cli/conf.d/20-fileinfo.ini,
/etc/php/7.2/cli/conf.d/20-ftp.ini,
/etc/php/7.2/cli/conf.d/20-gettext.ini,
/etc/php/7.2/cli/conf.d/20-iconv.ini,
/etc/php/7.2/cli/conf.d/20-json.ini,
/etc/php/7.2/cli/conf.d/20-phar.ini,
/etc/php/7.2/cli/conf.d/20-posix.ini,
/etc/php/7.2/cli/conf.d/20-readline.ini,
/etc/php/7.2/cli/conf.d/20-shmop.ini,
/etc/php/7.2/cli/conf.d/20-sockets.ini,
/etc/php/7.2/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.2/cli/conf.d/20-sysvsem.ini,
/etc/php/7.2/cli/conf.d/20-sysvshm.ini,
/etc/php/7.2/cli/conf.d/20-tokenizer.ini
llaville@LAPTOP-7JMHIOJJ:~/.devilbox$ php -v
PHP 7.2.24-0ubuntu0.18.04.3 (cli) (built: Feb 11 2020 15:55:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24-0ubuntu0.18.04.3, Copyright (c) 1999-2018, by Zend Technologies
Issue are in Docker Containers (latest release 0.123 used)
[email protected] in /shared/httpd $ php -v
PHP 7.4.13 (cli) (built: Dec 11 2020 08:31:11) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies
with Xdebug v3.0.1, Copyright (c) 2002-2020, by Derick Rethans
[email protected] in /shared/httpd $ php -r "echo get_cfg_var('cfg_file_path'), PHP_EOL;"
[email protected] in /shared/httpd $ php --ini
Configuration File (php.ini) Path: /usr/local/etc/php
Loaded Configuration File: (none)
Scan for additional .ini files in: /usr/local/etc/php/conf.d
Additional .ini files parsed: /usr/local/etc/php/conf.d/devilbox-runtime-sendmail.ini,
/usr/local/etc/php/conf.d/devilbox-runtime-timezone.ini,
/usr/local/etc/php/conf.d/docker-php-ext-amqp.ini,
/usr/local/etc/php/conf.d/docker-php-ext-apcu.ini,
/usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini,
/usr/local/etc/php/conf.d/docker-php-ext-bz2.ini,
/usr/local/etc/php/conf.d/docker-php-ext-calendar.ini,
/usr/local/etc/php/conf.d/docker-php-ext-dba.ini,
/usr/local/etc/php/conf.d/docker-php-ext-enchant.ini,
/usr/local/etc/php/conf.d/docker-php-ext-exif.ini,
/usr/local/etc/php/conf.d/docker-php-ext-ffi.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gd.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gettext.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gmp.ini,
/usr/local/etc/php/conf.d/docker-php-ext-igbinary.ini,
/usr/local/etc/php/conf.d/docker-php-ext-imagick.ini,
/usr/local/etc/php/conf.d/docker-php-ext-imap.ini,
/usr/local/etc/php/conf.d/docker-php-ext-intl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-ldap.ini,
/usr/local/etc/php/conf.d/docker-php-ext-mcrypt.ini,
/usr/local/etc/php/conf.d/docker-php-ext-memcache.ini,
/usr/local/etc/php/conf.d/docker-php-ext-memcached.ini,
/usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini,
/usr/local/etc/php/conf.d/docker-php-ext-msgpack.ini,
/usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini,
/usr/local/etc/php/conf.d/docker-php-ext-oauth.ini,
/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pcntl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_dblib.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_firebird.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_oci.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pgsql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pspell.ini,
/usr/local/etc/php/conf.d/docker-php-ext-psr.ini,
/usr/local/etc/php/conf.d/docker-php-ext-redis.ini,
/usr/local/etc/php/conf.d/docker-php-ext-shmop.ini,
/usr/local/etc/php/conf.d/docker-php-ext-snmp.ini,
/usr/local/etc/php/conf.d/docker-php-ext-soap.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sockets.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini,
/usr/local/etc/php/conf.d/docker-php-ext-solr.ini,
/usr/local/etc/php/conf.d/docker-php-ext-ssh2.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sysvmsg.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sysvsem.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sysvshm.ini,
/usr/local/etc/php/conf.d/docker-php-ext-tidy.ini,
/usr/local/etc/php/conf.d/docker-php-ext-uploadprogress.ini,
/usr/local/etc/php/conf.d/docker-php-ext-vips.ini,
/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini,
/usr/local/etc/php/conf.d/docker-php-ext-xlswriter.ini,
/usr/local/etc/php/conf.d/docker-php-ext-xmlrpc.ini,
/usr/local/etc/php/conf.d/docker-php-ext-xsl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-yaml.ini,
/usr/local/etc/php/conf.d/docker-php-ext-zip.ini,
/usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini,
/usr/local/etc/php/conf.d/yyy-devilbox-user-runtime-php.ini,
/usr/local/etc/php/conf.d/yyy-devilbox-user-runtime-xdebug.ini,
/usr/local/etc/php/conf.d/zzz-entrypoint-logfiles.ini
I got Loaded Configuration File: (none) while I've a custom php.ini file
llaville@LAPTOP-7JMHIOJJ:~/.devilbox$ ll cfg/php-ini-7.4/
total 28
drwxr-xr-x 2 llaville llaville 4096 Dec 20 17:24 ./
drwxr-xr-x 61 llaville llaville 4096 Nov 14 19:23 ../
-rw-r--r-- 1 llaville llaville 0 Nov 14 19:23 .keepme
-rw-r--r-- 1 llaville llaville 834 Nov 14 19:23 README.md
-rw-r--r-- 1 llaville llaville 1544 Nov 14 19:23 devilbox-php.ini-default
-rw-r--r-- 1 llaville llaville 1057 Dec 14 07:19 devilbox-php.ini-xdebug
-rw-r--r-- 1 llaville llaville 1406 Dec 20 17:24 php.ini
-rw-r--r-- 1 llaville llaville 988 Dec 18 07:48 xdebug.ini
Confirmed by the intranetDevilbox PHP info panel
I'm expected to have the same behavior with get_cfg_var('cfg_file_path')
with PHP native version (outside container) and PHP containerized version !
Tested at least with images 7.4 and 8.0 giving the same false results.
I'm trying to get this running with a legacy app for PHP 5.2
using the docker image.
Apache 2.4.29
Ubuntu 18.04
But I keep getting "No input file specified."
Running Docker with:
sudo docker run --restart=always -d -it -p 9001:9000 --name legacy_app -v /home/http/legacy_app/public/:/home/http/legacy_app/public devilbox/php-fpm:5.2-prod
Apache Virtualhost config:
<VirtualHost *:80>
DocumentRoot "/home/http/legacy_app/public"
DirectoryIndex index.php index.html
ServerName legacy.example.com
<Directory /home/http/legacy_app/public>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
<FilesMatch \.php$>
SetHandler application/x-httpd-php
SetHandler "proxy:fcgi://127.0.0.1:9001"
</FilesMatch>
</VirtualHost>
What am I missing?
PHP-FOM instead PHP-FPM
behaviour instead of behavior
Mount this directory into your host computer and add custom PHP-FOM *.conf files in order to alter >>PHP-FPM behaviour.
I have strange issue.
It happens at kinda random times. Always around 2m20s. (+/-5s).
I rised 180s PHPFPM timeout. It does not happend other pure apache server. I spent quite time debugging it.
[email protected] in /shared/httpd $ echo $PHP_MODULES_DISABLE
dba,enchant,gmp,igbinary,imap,interbase,ldap,mcrypt,memcached,msgpack,OAuth,oci8,pdo_dblib,PDO_Firebird,PDO_OCI,pdo_pgsql,pdo_sqlsrv,pgsql,phalcon,pspell,rdkafka,recode,redis,snmp,sqlsrv,swoole,tidy,uploadprogress,xmlrpc
It seems the environment variable gets ignored
Hey all,
I would like to propose that https://github.com/GoogleChrome/puppeteer be installed by default or using a flag in the work
versions of this container. A lot of tools/packages/frameworks are starting to use this image testing, screenshots, PDF generation that is more reliable than wkhtmltopdf
etc, for example: https://github.com/spatie/browsershot
Please let me know if you're interested. If you don't have the time to do it, I'm willing to create a PR for this.
Thanks in advance!
Can we enable xlswriter extension for php 8 build ?
When starting php-fpm 7.3 there is an issue where the command apt-get upgrade doesn't run as expected. Because of this no project is available, including the devilbox dashboard. Have you seen this before? This was working perfectly until a few days ago. I'm unclear as to what may have changed.
The script reads like this:
#!/bin/bash
#
# Simple example showing how to update the packet index
#
DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -q=2 upgrade
I removed the -y
from the update since its not needed. The example has the -q
after the upgrade
command and that also fails.
Here's the console output of just php starting
Creating network "devilbox_app_net" with driver "bridge"
Creating devilbox_bind_1 ... done Creating devilbox_php_1 ... done Attaching to devilbox_php_1
php_1 | [INFO] Debug level: 2
php_1 | [INFO] Changing user 'devilbox' uid to: 1000
php_1 | root $ usermod -u 1000 devilbox
php_1 | usermod: no changes
php_1 | root $ chown -R devilbox /home/devilbox || true
php_1 | chown: changing ownership of '/home/devilbox/.ssh': Read-only file system
php_1 | root $ chown -R devilbox /var/lib/php/session
php_1 | root $ chown -R devilbox /var/lib/php/wsdlcache
php_1 | [INFO] Changing group 'devilbox' gid to: 1000
php_1 | root $ groupmod -g 1000 devilbox
php_1 | root $ chown -R :devilbox /home/devilbox || true
php_1 | chown: changing group of '/home/devilbox/.ssh': Read-only file system
php_1 | root $ chown -R :devilbox /var/lib/php/session
php_1 | root $ chown -R :devilbox /var/lib/php/wsdlcache
php_1 | [INFO] Setting container timezone to: UTC
php_1 | root $ ln -sf /usr/share/zoneinfo/UTC /etc/localtime
php_1 | [INFO] Setting PHP: timezone=UTC
php_1 | root $ echo 'date.timezone = UTC' > /usr/local/etc/php/conf.d/devilbox-runtime-timezone.ini
php_1 | [INFO] Docker date set to: Fri Apr 24 16:14:57 UTC 2020
php_1 | [INFO] $DOCKER_LOGS set to 0. Logging to files under: /var/log/php
php_1 | [INFO] Make sure to mount this directory in order to view logs
php_1 | root $ chown -R devilbox:devilbox /var/log/php
php_1 | root $ chmod 0755 /var/log/php
php_1 | [INFO] $ENABLE_MAIL set to 2. Enabling postfix catch-all
php_1 | root $ chown devilbox:devilbox /var/log/php
php_1 | root $ chown devilbox:devilbox /var/log/php/mail.log
php_1 | root $ chmod 0644 /var/log/php/mail.log
php_1 | root $ chmod 0644 /var/mail/devilbox
php_1 | root $ chown devilbox:devilbox /var/mail
php_1 | root $ chown devilbox:devilbox /var/mail/devilbox
php_1 | root $ postconf -e 'strict_mailbox_ownership=no'
php_1 | root $ postconf -e 'inet_protocols=ipv4'
php_1 | root $ postconf -e 'virtual_alias_maps=pcre:/etc/postfix/virtual'
php_1 | root $ echo '/.*@.*/ devilbox' >> /etc/postfix/virtual
php_1 | root $ newaliases
php_1 | [INFO] Forwarding httpd:80 to 127.0.0.1:80 inside this docker.
php_1 | [INFO] Forwarding httpd:443 to 127.0.0.1:443 inside this docker.
php_1 | [INFO] Forwarding mysql:3306 to 127.0.0.1:3306 inside this docker.
php_1 | [INFO] Forwarding pgsql:5432 to 127.0.0.1:5432 inside this docker.
php_1 | [INFO] Forwarding redis:6379 to 127.0.0.1:6379 inside this docker.
php_1 | [INFO] Forwarding memcd:11211 to 127.0.0.1:11211 inside this docker.
php_1 | [INFO] Forwarding mongo:27017 to 127.0.0.1:27017 inside this docker.
php_1 | [INFO] Enabling 'socat-80-httpd-80' to be started by supervisord
php_1 | [INFO] Enabling 'socat-443-httpd-443' to be started by supervisord
php_1 | [INFO] Enabling 'socat-3306-mysql-3306' to be started by supervisord
php_1 | [INFO] Enabling 'socat-5432-pgsql-5432' to be started by supervisord
php_1 | [INFO] Enabling 'socat-6379-redis-6379' to be started by supervisord
php_1 | [INFO] Enabling 'socat-11211-memcd-11211' to be started by supervisord
php_1 | [INFO] Enabling 'socat-27017-mongo-27017' to be started by supervisord
php_1 | [INFO] Enabling 'rsyslogd' to be started by supervisord
php_1 | [INFO] Enabling 'postfix' to be started by supervisord
php_1 | [INFO] Enabling 'php-fpm' to be started by supervisord
php_1 | [INFO] PHP.ini: devilbox-php-xdebug.ini -> /usr/local/etc/php/conf.d/yyy-devilbox-user-runtime-devilbox-php-xdebug.ini
php_1 | root $ cp /etc/php-custom.d/devilbox-php-xdebug.ini /usr/local/etc/php/conf.d/yyy-devilbox-user-runtime-devilbox-php-xdebug.ini
php_1 | root $ find /usr/local/etc/php/conf.d -type f -iname '*.ini' -exec chmod 0644 "{}" \;
php_1 | root $ find /usr/local/etc/php-fpm.d -type f -iname '*.conf' -exec chmod 0644 "{}" \;
php_1 | [INFO] $ENABLE_MODULES set, but empty. Not enabling any PHP modules.
php_1 | [INFO] Disabling the following PHP modules: oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole
php_1 | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini
php_1 | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-pdo_sqlsrv.ini
php_1 | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-sqlsrv.ini
php_1 | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-rdkafka.ini
php_1 | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-swoole.ini
php_1 | root $ chown devilbox:devilbox /etc/mysqldump-secure.conf
php_1 | root $ chown devilbox:devilbox /etc/mysqldump-secure.cnf
php_1 | root $ chown devilbox:devilbox /var/log/mysqldump-secure.log
php_1 | root $ chown devilbox:devilbox /shared/backups/mysql
php_1 | [INFO] $MYSQL_BACKUP_USER set for mysqldump-secure. Changing to 'root'
php_1 | root $ sed -i'' 's/^user.*/user = root/g' /etc/mysqldump-secure.cnf
php_1 | [INFO] $MYSQL_BACKUP_PASS set for mysqldump-secure. Changing to '******'
php_1 | root $ perl -pi -e 's/^password.*/password = /g' /etc/mysqldump-secure.cnf
php_1 | [INFO] $MYSQL_BACKUP_HOST set for mysqldump-secure. Changing to 'mysql'
php_1 | root $ sed -i'' 's/^host.*/host = mysql/g' /etc/mysqldump-secure.cnf
php_1 | root $ chown devilbox:devilbox /shared/backups
php_1 | root $ chown devilbox:devilbox /shared/httpd
php_1 | root $ chmod 0755 /shared/backups
php_1 | root $ chmod 0755 /shared/httpd
php_1 | root $ cp /ca/devilbox-ca.crt /usr/local/share/ca-certificates/devilbox-devilbox-ca.crt
php_1 | root $ update-ca-certificates
php_1 | Updating certificates in /etc/ssl/certs...
php_1 | 1 added, 0 removed; done.
php_1 | Running hooks in /etc/ca-certificates/update.d...
php_1 | done.
php_1 | [INFO] Executing custom startup script: 01-update-apt-index.sh
php_1 | /startup.1.d/01-update-apt-index.sh: line 5: $'\r': command not found
php_1 | Get:1 http://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
php_1 | Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
php_1 | Get:3 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
php_1 | Ign:4 http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 InRelease
php_1 | Get:5 http://ppa.launchpad.net/git-core/ppa/ubuntu artful InRelease [15.4 kB]
php_1 | Get:6 http://dl.yarnpkg.com/debian stable/main all Packages [9953 B]
php_1 | Get:7 http://ftp.debian.org/debian stretch-backports InRelease [91.8 kB]
php_1 | Get:8 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
php_1 | Get:9 http://dl.yarnpkg.com/debian stable/main amd64 Packages [9953 B]
php_1 | Get:10 http://security.debian.org/debian-security buster/updates/main amd64 Packages [187 kB]
php_1 | Get:11 http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease [56.3 kB]
php_1 | Get:12 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
php_1 | Get:13 http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 Release [1490 B]
php_1 | Get:14 http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 Release.gpg [801 B]
php_1 | Get:15 http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0/main amd64 Packages [13.0 kB]
php_1 | Get:16 http://apt.postgresql.org/pub/repos/apt stretch-pgdg/main amd64 Packages [213 kB]
php_1 | Get:17 http://ftp.debian.org/debian stretch-backports/main amd64 Packages [611 kB]
php_1 | Get:18 http://ppa.launchpad.net/git-core/ppa/ubuntu artful/main amd64 Packages [3324 B]
php_1 | Get:19 http://packages.blackfire.io/debian any InRelease [23.2 kB]
php_1 | Get:20 http://packages.blackfire.io/debian any/main amd64 Packages [1204 B]
php_1 | Get:21 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B]
php_1 | Fetched 9406 kB in 10s (918 kB/s)
php_1 | Reading package lists...
php_1 | E: Unable to locate package
php_1 | [ERR] Failed to execute script
devilbox_php_1 exited with code 1```
i have devilbox with apache2.4 and php5.6
in my .htaccess i have
php_value memory_limit 64M
php_value memory_limit 256M
php_value max_execution_time 18000
ecc......
Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
the problem if apache not have mod_php
how i can resolve it
When running docker-compose exec --user devilbox php bash -l
, every time you exit the container you lose the history of commands you typed. This is frustrating because I run a lot of tests, phpcs and phpcbf commands that I don't want to lose and have to type again.
When running docker-compose exec --user devilbox php zsh -l
, it's slightly worse, because it always asks for a "first-time setup" every time you enter the container.
Is it possible to persist .bash_history and zsh history (I don't know what the file would be)?
Thanks!
The following issue was reported elsewhere and will be copied here:
Running the following:
apache (2.4.27) PHP (7.1.9) MySQL (5.6.39)I am connecting to a WSDL file via SOAP, with header wsdl_cache_enabled set to 0.
The error I was getting was a permission denied error when trying to open a file in
/var/lib/php/wsdlcache/
The permissions for this folder were root:apache, changing to root:devilbox fixed my issue.
Really don't understand why or how, but as I said, it may help you in the future.
NEW_UID
and NEW_GID
Hello Cytopia,
Latest versions of PHP are not available !
Even if PHP Nightly github actions seems fine:
i:e: https://github.com/devilbox/docker-php-fpm/runs/603614724?check_suite_focus=true#step:8:381
Thanks to have a look on it
Laurent
With some recent update of php71 docker image I started receiving "Illegal instruction (core dumped)" when I try to run any php code, even with "php -v" or "php -i". It results in the docker image restarting all the time.
PHP works fine with php71-base but starts to crash with php71-mods and also php71-prod.
When using the images in the Gitlab CI enviornment the fpm process stays waiting until finally timeout.
Here is a the gitlab-ci.yml file that I am trying to use -
variables:
# Configure mysql service (https://hub.docker.com/_/mysql/)
MYSQL_DATABASE: wordpress_tests
MYSQL_ROOT_PASSWORD: mysql
Test:
image: devilbox/php-fpm:7.3-work
services:
- mysql:5.6
script:
# Install PHPCS and WPCS
- composer install
- vendor/bin/phpcs
- if find . -name "*.php" ! -path "./vendor/*" ! -path "./admin/bsf-core/*" -exec php -l {} \; | grep "Errors parsing"; then exit 1; fi
- vendor/bin/phpunit
Just swapping PHP image with other php images works as expected. eg - wordpressdevelop/php:7.3-fpm
or nikschavan/docker-php:7.1
Any solution to how these images can be used in the Gitlab CI environment?
Nightly automated builds in travis ci fail because the max log length is reached.
Hi Guys, i need to pass the variable NLS_LANG inside de php, but the only way that i found to do this is editing the xml file in /usr/local/etc/php-fpm.conf. I add the line bellow inside:
american_america.WE8ISO8859P1
But this is the right way to do this? When i pass the variable with docker run -e, this dont pass inside the php (when i run the phpinfo();)
I have already change the directorys /etc/php-fpm-custom.d/charset.conf and /etc/php-custom.d/charset.ini but no effect.
I am using the image devilbox/php-fpm:5.2-prod
Hello Cytopia,
I've tried to used PHP 7.4 php-pfm images from devilbox, but no stable PHP 7.4 version seems available.
Of course, i've tried current version 0.94 but also 0.95
After upgrading, i got this one :
https://hub.docker.com/layers/devilbox/php-fpm/7.4-work-0.95/images/sha256-b1cc0ef307beeccac3413c3cf63c135ce5c6b523012f14f758b0b04dd0878303
But when I enter the container, here is the result
[email protected] in /shared/httpd $ php -v
PHP 7.4.1-dev (cli) (built: Nov 30 2019 00:27:31) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.1-dev, Copyright (c), by Zend Technologies
with Xdebug v2.8.0, Copyright (c) 2002-2019, by Derick Rethans
the devilbox php-fpm images were built 20 hours ago (when i write this issue), and official PHP docker images are avaiable since 2 days
https://hub.docker.com/_/php/?tab=tags&page=1&name=7.4
What's wrong ?
Hello Cytopia,
I've difficulty to track changes between each releases.
Could you consider to add a CHANGELOG file as in devilbox project with same format : https://keepachangelog.com/en/1.1.0/
Thanks
Laurent
When using the PHP 7.3 version of this image (either the work or mods variant, haven't tested the others), I'm getting 502 Bad Gateway
errors for 80% of the requests. There's nothing in the php-fpm
error log, but the nginx error log produces the following error for each request:
[error] 102#102: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.128.1, server: enigma.localhost, request: "GET /nova/ HTTP/1.1", upstream: "fastcgi://192.168.128.4:9000", host: "enigma.localhost"
However, not all requests fail. I haven't been able to pinpoint the issue of what's causing it, but I do know that the issue is not present with the PHP 7.2 version of this image.
If it matters anything, I am not using the full devilbox suite, but have built my own docker-compose.yml
file with the devilbox images for nginx
and php-fpm
along with the official images for redis
and mariadb
If the configuration files are separated, one could actually allow for having memory_limit off by default for all cli interactiions. This would solve a lot of command line troubles and still allows you to configure the FPM server accordingly/differently
with ENABLE_MODULES soap
I get this error in the logs
NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/soap' - /usr/lib/php/20151012/soap: cannot open shared object file: No such file or directory in Unknown on line 0
My section in docker-compose.yml
php-fpm:
build: devilbox/php-fpm:7.0-mods
container_name: ideas-php-fpm
working_dir: /application
enviroment:
ENABLE_MODULES: soap,pgsql,curl,intl,json,xmlrpc,xml,zip
I need to develop interaction between APIs running different versions of PHP. The way the devilbox configuration is set up, I can only run one.
Hi, I'm trying to set LC_TIME but locale-gen is missing (I'm using devilbox/php-fpm:5.3-mods). What's the best practice to configure LC_ALL on this image? Thanks :-)
Good day!
Thanks for your images.
The question is, I use the php-fpm: 5.6-work image.
I need the php to be available on port 9001.
Made the following configurations:
Nginx
fastcgi_pass php5.6: 9001
Docker-compose
ports:
- 9001: 9001
PHP-FPM
/etc/php-fpm-custom.d/www.conf
[www]
listen = 9001_
Nginx throws an error
[error] 6 # 6: * 1 connect () failed (111: Connection refused) while connecting to upstream, client
Hello @cytopia
Docker Hub images corresponding to tag 0.113 was updated 15 days ago.
Github Action (PHP-Nightly) seems OK but no new images are available.
Could you checks on your side please ?
Thanks in advance
Hi,
can you update Ruby Sass tool to Dart Sass ?
Ruby Sass reached its EOL.
Looks like this newest commit is causing an issue when starting a session:
bash: nvm: command not found
When you run nvm
in the shell it seems to be there though.
How to add php5-imap and php5-gd in php-fpm-5-3 ?
I have tried to add it using shell command in the container, but always failed.
Can you show me how to do that?
Thank you
The current entrypoint script runs supervisor by default, but could it be possible to instead allow the user do issue their own startup command?
i.e.
at the end of docker-entrypoint.sh
exec "$@"
Then in the user's Dockerfile, one can run their own supervisor command with different arguments, or even run a php script:
CMD ["php", "my-cron-script.php"]
I can make these changes.
Hello @cytopia
Current Travis-CI jobs failed to build the new 0.54 version that should accept new PHP versions released on Dec 6th.
Laurent
Please Add Laravel Lumen.
Website: https://lumen.laravel.com/docs/5.8
Git Repo: https://github.com/laravel/lumen
Hi,
could you please make a build of php-7.2.31 and upload to docker hub?
Thansk a lot
ENx
Copied from @bigxu / cytopia/devilbox#228
latest version of devilbox.
/etc/bashrc-devilbox.d/*.sh ( - ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d ) have not been executed.
/etc/bash-custom.d/*sh have been executed. but /etc/bash-custom.d have not been mounted.
Hi,
This is more of a request and I hope someone can help me. I will be entirely grateful. I am building an application on PHP with SLIM framework using Twig as a view engine. My application is powered by nginx. I am building a container for production and I am using devilbox (awesome btw) with php-fpm:7.2-prod. Everything works well except for this error:
2018/11/01 19:10:37 [error] 31#31: *1 FastCGI sent in stderr: "PHP message: Slim Application Error:
rbWeb | Type: RuntimeException
rbWeb | Message: Unable to create the cache directory (/var/www/config/../cache/0c).
rbWeb | File: /var/www/vendor/twig/twig/lib/Twig/Cache/Filesystem.php
I have spent close to 26 hours trying to figure out what is wrong with no luck. I am quite new to docker and I hope someone out there can point me into the right direction. This is my Dockerfile
FROM devilbox/php-fpm:7.2-prod
# Copy composer scripts
COPY ./composer.lock ./composer.json /var/www/
# Set the working directory
WORKDIR /var/www
# Install Git as it's needed for composer
# install git
RUN apt-get update \
&& apt-get install --assume-yes git zip unzip
# Install Composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& php composer.phar install --no-dev --no-scripts \
&& rm composer.phar
# Create Cache directory for SLIM
RUN mkdir /var/www/cache
# Copy all files from my development to the container (with .dockerignore enforced)
COPY . /var/www
# Fix permissions for my folders
RUN chown -R www-data:www-data /var/www
RUN chown -R www-data:www-data /var/www/cache
RUN chown -R www-data:www-data /var/www/logs
I would really appreciate if anyone would suggest a fix. Thank you so much.
I have some code that needs APCu in PHP 7.4 but it looks like Blackfire and maybe other modules are missing too.
Hello @cytopia
This is not the first one that occured.
When we try to get new docker php-fpm images, we got such issue
ERROR: for php manifest for devilbox/php-fpm:7.3-work-0.120 not found: manifest unknown: manifest unknown
ERROR: manifest for devilbox/php-fpm:7.3-work-0.120 not found: manifest unknown: manifest unknown
Reason is tag missing; see at docker hub :
I have MySQL in a docker container with exposed port 3306:3306
, so i can access it on the host machine using 127.0.0.1:3306 address, however devilbox php-fpm container cannot connect to it, says connection refuses. I have allowed mysql user to user any host %
, but still, it cannot connect.
Launching container with the following command: docker run -d --rm --name phpfpm5 -p 9001:9000 -v /srv/www:/srv/www devilbox/php-fpm:5.6-prod
Hello Cytopia,
Latest version of PHP are not available, probably due to an error in nightly deployment : see Github actions => https://github.com/devilbox/docker-php-fpm/actions/runs/54690173
It were officially published in Feb, 20 and available as Docker Images on Feb 26.
Almost one month now, that we should have new images of devilbox php-fpm available.
I know that your support is limited until end of this month, but could you have a look on it please !
Thanks
Laurent
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.