tried all fpm version of docker images, nothing working normally. php apache version works. How to make fpm image working as expected?
Hi @Wyvern - could you provide what you mean by "not working"? Error messages? Thanks!
run all fpm images got the logs like below:
NOTICE: fpm is running, pid 1
NOTICE: ready to handle connections
but actually wordpress not working at all.
"docker run --name wp -d --restart=always -e WORDPRESS_DB_HOST=127.0.0.1:3306 --net=host -e WORDPRESS_DB_USER=user -e WORDPRESS_DB_PASSWORD=pass -v /wp:/var/www/html wordpress:php7.1-fpm"
The FPM images use the FastCGI protocol (rather than simply HTTP like the Apache variants do), and thus require something like NGINX or Apache (which can translate HTTP requests to FastCGI) in front of them in order to connect and use them appropriately. See also https://github.com/docker-library/wordpress/issues/185.
In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow.
@tianon the php-fpm images comes with apache right? So why are you pushing blame away from the image and expecting something else nginx or apache to front it? if the image wont work as is..then why have the image then? i mean this is wordpress image with web server inbuilt so i expect it to work as is
@babatundebusari,
php-fpm does not include the Apache httpd web server. It is just PHP FPM which only listens for a FastCGI connection, so you need a server in front of it that speaks fcgi and can serve up http[s] like Nginx or Httpd. We do not include either of these in the php-fpm image since we stick to one concern per container and don't want to add a supervisor process to the container.
Here are a couple users tutorials on using Nginx with the php-fpm container: