This is a basic LAMP stack environment built using Docker Compose. It consists following:
- PHP
- Apache 2.4
- MySQL 5.7
- phpMyAdmin
- redis
As of now, we have 4 different branches for different PHP versions. Use appropriate branch as per your php version need:
Clone this repository on your local computer and checkout the appropriate branch e.g. 7.x.x. Run the docker-compose up -d
.
git clone https://github.com/gehlotanish/docker-php.git
cd docker-php/
git fetch --all
cd bin/
bash install-docker.sh
bash install-docker-compose.sh
git checkout 7.x.x
docker-compose up -d
Your LAMP stack is now ready!! You can access it via http://localhost
.
By default following modules are enabled.
- rewrite
- headers
- ssl
- vhost_alias
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 webserver /bin/bash
docker exec -it mysql /bin/bash
This package comes with default configuration options. You can modify them by creating .env
file in your root directory.
To make it easy, just copy the content from sample.env
file and update the environment variable values as per your need.
phpMyAdmin is configured to run on port 8000
.
http://localhost:8000/
It comes with Redis. It runs on default port 6379
.
Please read from appropriate version branch.