A very basic LAMP stack environment for development. It was built using Docker Compose 3.7 and consists following:
For PHP 5.6 you can change to the branch php-5
Clone this repository on your local computer and run the docker compose on your terminal.
docker-compose up -d --build
In order to run this container you'll need docker installed.
Clone this repository on your local computer and run the docker compose on your terminal.
git clone https://github.com/andreipa/docker-lamp
cd docker-lamp/
git fetch --all
docker-compose up -d --build
You can access your LAMP stack via http://localhost
This package comes with default configuration options. You can modify them by editing the Dockerfile inside the folders ./bin/mysql
and ./bin/webserver
.
DOCUMENT_ROOT
- The document root for the Apache server. The default value is./www
. All your sites will go here and will be synced automatically.VHOSTS_DIR
- The virtual hosts. The default value for this is./config/vhosts.
You can place your virtual hosts conf files here.APACHE_LOG_DIR
- This will be used to store Apache logs. The default value for this is./logs/apache2
.MYSQL_LOG_DIR
- This will be used to store Apache logs. The default value for this is./logs/mysql
.MYSQL_DATA_DIR
- This is MySQL data directory. The default value for this is./data/mysql
. All your MySQL data files will be stored here.PHP_INI
- The file php.ini with custom configuration. You can customise as you need and saving it at./config/php/
.
DB_ROOT_PASSWORD
- The root password of the MySQL. Defaultroot
.DB_USER
- Optional user name with superuser permissions. Defaultuser
.DB_PASSWORD
- Optional password for the user. Defaultroot
.
Apache is configured to run on port 80. So, you can access it via http://localhost
.
By default following modules are enabled.
- rewrite
- headers
If you want to enable more modules. Just update
./bin/webserver/Dockerfile
.
You can connect to web server using docker exec
command to perform various operation on it. Use below command to login to container via ssh.
docker exec -it 7.3.x-webserver /bin/bash
The installed version of PHP is 7.3
By default following extensions are installed.
- bcmath
- calendar
- curl
- exif
- gettext
- imagick-3.4.3
- mysqli
- pdo_sqlite
- xdebug-2.7.0RC1
- zip
If you want to install more extension, just update
./bin/webserver/Dockerfile
.
- Debian
- Composer
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Andrei Andrade - Initial work - andreipa
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Many thanks to Docker