#docker-nginx-phpfpm
This container is made to run any php application without any specific specifications
If you require a mysql database linked to the application this container will require a seperate dedicated mysql container (timherman/mysql) to run. You can find timherman/mysql either at docker (https://registry.hub.docker.com/u/timherman/mysql/) or github (https://github.com/timHerman/docker-mysql)
docker run -d --name="be.punk.www.mysql" -e "MYSQL_LOCAL_USER=[username]" -e "MYSQL_LOCAL_DATABASE=[database]" -e "MYSQL_LOCAL_PASSWORD=[password]" -v /location/of/mysqldata/at/host/:/var/lib/mysql/ timherman/mysql
docker run -d --name="be.punk.www.phpfpm" -p 80:80 -v /location/of/phpfpmdata/at/host/:/var/www/ --link be.punk.www.mysql:db timherman/nginx-phpfpm
In our example the phpfpm container is linked to the mysql container under the alias db. This means that you'll have to edit your wp-config file in such a way that the mysql host is no longer localhost but db.
/** MySQL hostname */
define('DB_HOST', 'db');
For more information leave a message or visit http://www.punk.be
Regards, Tim
Content type
Image
Digest
sha256:31c17bc26…
Size
174.2 MB
Last updated
about 11 years ago
docker pull timherman/nginx-phpfpm