Dockerfile linksDocker container built with CentOS 7, NGINX (or HTTPD) and PHP 7 with compatible version and modules for Wordpress
These are the Docker Hub autobuild images located here.

$ docker pull locnh/docker-wordpress
$ docker run --name wordpress -v /path/to/wordpress:/var/www/html -p 80:80 -d locnh/docker-wordpress
That's it !
Just add the environment variable with -e WEB_SRV=apache or -e WEB_SRV=httpd
Example:
$ docker run --name wordpress -e WEB_SRV=httpd -v /path/to/wordpress:/var/www/html -p 80:80 -d locnh/docker-wordpress
uid (and/or gid) of apache inside containerTo change the apache uid, use -e UID=<your uid> (you can use this).
To change the apache gid, use -e GID=<your gid> (use at your own risk).
Example:
$ docker run --name wordpress -e UID=501 -v /path/to/wordpress:/var/www/html -p 80:80 -d locnh/docker-wordpress
Beside Webroot /var/www/html, you can use option -v to mount more volumes to the container such as services logs:
/var/log/nginx/var/log/httpd/var/www/php-fpmContent type
Image
Digest
Size
198.2 MB
Last updated
about 9 years ago
docker pull locnh/docker-wordpress