How to install Docker and deploy a LAMP Stack

– Docker is a container platform for applications. With Docker, users can download pre-configured apps without the hassle of the installation and configuration process. Docker containers can also build on each other.

sudo docker pull linode/lamp

– Run, create, or turn on a new container and forward port 80: sudo docker run -p 80:80 -t -i linode/lamp /bin/bash – As the container’s root user, start Apache:

service apache2 start
– Start MySQL:

service mysql start

– Exit the container while while leaving it running by pressing:

ctrl + p then ctrl + q.

– Enter the IP address in a web browser to test the site.

Note
The website’s root directory is /var/www/example.com/public_html/.

Congratulations, you have installed a configured LAMP stack using Docker!

Source: How to install Docker and deploy a LAMP Stack

How to install Docker and deploy a LAMP Stack was last modified: February 10th, 2019 by Jovan Stosic

Leave a Reply