β οΈ this repository has become read-only, you will no longer receive updates or support
Watch the video π
Docker with Apache, MariaDB, PHPMyAdmin and PHP.
Let's start by downloading the repository to our server.
git clone https://github.com/Hylosium/rpi-docker-lamp.git
Once it's downloaded we get inside the folder.
cd rpi-docker-lamp
I use docker-compose as an orchestrator. To run these containers:
docker-compose up -d
| Service | Port |
|---|---|
| HTTP | 80 |
| PHPADM | 8000 |
| SQL | 3306 |
Open phpmyadmin at http://127.0.0.1:8000 No password needed, only root user.
Open web browser to look at a simple php example at http://127.0.0.1:80
Clone YourProject on www/ and then, open web http://127.0.0.1/YourProject
Run MySQL client:
docker-compose exec db mysql -u root -p
Infrastructure as code!
Structure of folders:
/docker-lamp/
βββ docker-compose.yml
βββ Dockerfile
β
βββ conf/
β
βββ dump/
β βββ myDb.sql
βββ www/
βββ index.php

