# 🚀 Docker LAMPP Stack



Welcome to the **Docker LAMPP Stack** repository! This project provides a flexible and powerful environment for web development, combining Linux, Apache, MariaDB, and PHP with Docker on Ubuntu 24.04 LTS.
## 🌟 Features
- **Multi-PHP Version Support**: Choose between PHP 7.4, 8.0, 8.1, and 8.3 to meet your project needs.
- **Full Stack**: Includes Apache, MariaDB, and additional tools like Redis, Composer, Node.js, phpMyAdmin, and Adminer.
- **Ease of Use**: Set up your development environment quickly and efficiently using Docker.
- **Customizable**: Easily modify configurations to suit your project requirements.
## 🛠️ Technologies Used
- **Linux**: The base operating system, providing a reliable environment.
- **Apache**: The web server for serving your applications.
- **MariaDB**: A powerful database management system for storing data.
- **PHP**: The server-side scripting language for dynamic content.
- **Redis**: A fast in-memory data structure store.
- **Composer**: Dependency manager for PHP.
- **Node.js**: JavaScript runtime for server-side scripting.
- **phpMyAdmin**: A web interface for managing MySQL/MariaDB databases.
- **Adminer**: An alternative lightweight database management tool.
## 🔗 Quick Start Guide
### Prerequisites
Ensure you have Docker and Docker Compose installed on your machine. If not, you can download them from the official Docker website.
### Installation
1. Clone the repository:
```bash
git clone https://github.com/FineG21/docker-lampp-stack.git
cd docker-lampp-stack
-
Start the LAMPP stack:
docker-compose up -d
-
Access your applications:
- Visit
http://localhost
for your PHP application. - Access phpMyAdmin at
http://localhost:8080
. - Access Adminer at
http://localhost:8081
.
- Visit
To stop the running containers, use:
docker-compose down
To download the latest releases and updates, please check the Releases section for executable files.
Here is the structure of the project:
docker-lampp-stack/
├── docker-compose.yml
├── Dockerfile
├── php/
│ ├── php.ini
│ └── ...
├── web/
│ ├── index.php
│ └── ...
└── database/
└── init.sql
- docker-compose.yml: Manages multi-container Docker applications.
- Dockerfile: Contains instructions for building Docker images.
- php.ini: Configuration file for PHP.
- init.sql: Optional SQL file for database initialization.
Once the Docker containers are running, access the services via the specified ports:
- Web Application:
http://localhost
- phpMyAdmin:
http://localhost:8080
- Adminer:
http://localhost:8081
Redis is included in this stack for caching and session management. To use Redis, connect to it using your preferred Redis client.
Composer is installed for dependency management in PHP projects. You can run Composer commands inside the PHP container.
Node.js is included for projects that require JavaScript on the server side. Install any necessary packages with npm
or yarn
.
For phpMyAdmin and Adminer, you may want to set up your username and password. This can be done by modifying the environment variables in your docker-compose.yml
file:
environment:
MYSQL_ROOT_PASSWORD: yourpassword
We welcome contributions! If you would like to contribute to the project, please follow these steps:
- Fork the repository.
- Create your feature branch.
- Commit your changes.
- Push to the branch.
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Join our community for discussions, support, and more:
- GitHub Issues: Report bugs or request features.
- Discussions: Share your thoughts, ideas, and suggestions.
- Keep your Docker images up to date.
- Use
.env
files for environment variables to secure sensitive information. - Consider using Docker Volumes for persistent data storage.
Feel free to customize the Dockerfiles and configurations to better suit your projects. You can also add additional services as needed.
The LAMPP stack can integrate with various CI/CD pipelines. Consider using GitHub Actions, Jenkins, or CircleCI for automated deployments.
If you encounter issues:
- Check the logs with
docker-compose logs
. - Ensure all services are running properly.
- Consult the official documentation for Docker, PHP, and MariaDB.
Q: How do I switch PHP versions?
You can switch PHP versions by modifying the Dockerfile
or the docker-compose.yml
file to specify the desired PHP version.
Q: How do I persist my database?
Use Docker Volumes in your docker-compose.yml
to ensure your database persists across container restarts.
- Optimize your Apache and PHP settings for better performance.
- Use caching mechanisms like Redis to reduce database load.
- Regularly update your dependencies.
For support, consider checking GitHub issues or joining Docker and PHP forums for community-driven assistance.
Thank you for checking out the Docker LAMPP Stack! We hope it serves you well in your web development journey. Happy coding! 🎉