docker-library / wordpress

Docker Official Image packaging for WordPress
https://wordpress.org/
GNU General Public License v2.0
1.78k stars 1.07k forks source link

Any fpm images is working #209

Closed rafilkmp3 closed 6 years ago

rafilkmp3 commented 7 years ago

Hi i wish report any of php-fpm images is working out of the box

docker run -p 80:80 wordpress:php7.1-fpm-alpine docker run -p 80:80 wordpress:php7.0-fpm

all is

yosifkit commented 7 years ago

The fpm images expose the FPM port 9000, so there won't be anything at port 80.

$ docker inspect wordpress:php7.1-fpm
...
            "ExposedPorts": {
                "9000/tcp": {}
            },

You will need something in front of WordPress that speaks FastCGI and then serves up http(s), like nginx. There is an example by IndieHosters of extending the fpm WordPress image and then using a docker-compose.yml to bring it up with mysql and nginx.

This is also related to https://github.com/docker-library/wordpress/issues/185, which eventually links to this example as well https://gist.github.com/md5/d9206eacb5a0ff5d6be0.

rafilkmp3 commented 7 years ago

but these images supposed to work out the box like apache does ?

yosifkit commented 7 years ago

They provide the FastCGI interface, so they work as designed. Often users want to have one nginx in front of many php sites and it saves them resources to not be running apache for all of them and instead use the fpm versions that only run fastcgi. If you just want WordPress serving http, then the apache variant is probably what you want.