This is a docker file that take an image from alpine linux and create a lamp stack
docker run -d -v /path/to/project:/var/www/localhost/htdocs/ -v /path/to/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password -p 80:80 -p 3306:3306 --name lamp glats/alpine-lamp
git clone https://github.com/glats/alpine-lamp && cd alpine-docker-lamp/
docker build -t username/alpine-lamp .
docker run -d -v /path/to/project:/var/www/localhost/htdocs/ -e MYSQL_ROOT_PASSWORD=password -p 80:80 -p 3306:3306 --name lamp glats/alpine-lamp
mysql -u root -p -h 127.0.0.1
If you get a "forbidden error 403" in your project run:
sudo chmod -Rf 755 /path/to/project
If missing some lib for php please let me know or create a pull request