This image contains a LAMP stack based on Ubuntu 14.04, Apache2, PHP5-fpm, and MySQL.
- User: admin
- Pass: admin
- Port: 3308
- Host: localhost
- Start command: service mysql start
- Default server root: /var/www/html
- Start command: service apache start
- Start command: service php5-fpm start
Assume you have your website files at '~/my-site'. In order to start the lamp server using those files run the following command:
- sudo docker run -i -t -v ~/my-site:/var/www/html -p 80:80 -p 3308:3308 carlosreynosa/lamp-server:ubuntu-apache-mysql-php5fpm /bin/bash
Once you're inside the running server start up all the necessary services with the following commands:
- service apache2 start
- service php5-fpm start
- service mysql start
Once all the services have been started successfully you can detach from the running image by pressing the key combination 'ctrl+p and ctrl+q'
Your site i now running on http://localhost:/. Your site show now be able to run PHP scripts and be able to connect to the running MySQL database using the given MySQL credentials.