Skip to content

j1cs/docker-lamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker with LAMP stack based on Alpine Linux

This docker contain a LAMP stack installed from scratch

Installation

Grab from docker hub

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 j1cs/alpine-lamp

Run you own image

git clone https://github.com/j1cs/alpine-lamp && cd alpine-lamp/

Build the image

docker build -t $USER/alpine-lamp .

Run it

docker run -d -v /path/to/project:/var/www/localhost/htdocs/ -e MYSQL_ROOT_PASSWORD=password -p 80:80 -p 3306:3306 --name lamp $USER/alpine-lamp

Connect to MariaDB

To use this you need to install mysql/mariadb cli client

mysql -uroot -ppassword -h 127.0.0.1

PhpMyAdmin

If you want to use phpMyAdmin use the branch called: phpmyadmin-feature

Troubleshooting

Forbidden error 403

sudo chmod -Rf 755 /path/to/project

Error activating InnoDB

If you get errors about activating InnoDB and you are on Windows or Mac, you may be encountering this issue with using host-mapped volumes for MariaDB. Work-around is to use a named volume (persistent but not mapped), or add/overwrite mysql config before entry.

Missing libs

Please let me know or create a pull request

Repos

https://hub.docker.com/r/j1cs/alpine-lamp
https://github.com/j1cs/alpine-lamp