fauria/lamp
Modern, developer friendly LAMP stack. Includes Apache 2, MariaDB 10, PHP 7 and some useful tools.
500K+
This Docker container implements a last generation LAMP stack with a set of popular PHP modules. Includes support for Composer, Bower and npm package managers and a Postfix service to allow sending emails through PHP mail() function.
If you dont need support for MySQL/MariaDB, or your app runs on PHP 5.4, maybe fauria/lap suits your needs better.
Includes the following components:
You can download the image using the following command:
docker pull fauria/lamp
This image uses environment variables to allow the configuration of some parameteres at run time:
All
) or disable (None
) the usage of an .htaccess
file.mysql
or nano
.The image exposes ports 80
and 3306
, and exports four volumes:
/var/log/httpd
, containing Apache log files./var/log/mysql
containing MariaDB log files./var/www/html
, used as Apache's DocumentRoot directory./var/lib/mysql
, where MariaDB data files are stored./etc/apache2
, where Apache configuration files are stored.Please, refer to https://docs.docker.com/storage/volumes for more information on using host volumes.
The user and group owner id for the DocumentRoot directory /var/www/html
are both 33 (uid=33(www-data) gid=33(www-data) groups=33(www-data)
).
The user and group owner id for the MariaDB directory /var/log/mysql
are 105 and 108 repectively (uid=105(mysql) gid=108(mysql) groups=108(mysql)
).
Create a temporary container for testing purposes:
docker run -i -t --rm fauria/lamp bash
Create a temporary container to debug a web app:
docker run --rm -p 8080:80 -e LOG_STDOUT=true -e LOG_STDERR=true -e LOG_LEVEL=debug -v /my/data/directory:/var/www/html fauria/lamp
Create a container linking to another MySQL container:
docker run -d --link my-mysql-container:mysql -p 8080:80 -v /my/data/directory:/var/www/html -v /my/logs/directory:/var/log/httpd --name my-lamp-container fauria/lamp
Get inside a running container and open a MariaDB console:
docker exec -i -t my-lamp-container bash
mysql -u root
docker pull fauria/lamp