

How to install Lamp stack using Docker
source link: https://www.ashishjha.com/technology/security/how-to-install-lamp-stack-using-docker.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.


Docker can be used to install LAMP stack on any platform in just few simple steps. Docker is easy to install and manage and this gives full control on the configurations of your environment. Along with this, docker also ensures that your application runs perfectly fine after deployment across platforms.
Check if the docker is installed or not?
First step is to check if docker is installed on your computer or not. If it is not installed, it should be installed first before moving to next step. Docker comes in many flavors and it can be installed on any platform be it Windows , Linux or Mac. So far so good but How to check if docker is installed or not? It’s easy, open the terminal of your machine and just run the below command in the terminal.
docker info
If docker is installed, the result shows docker version and other information something like below screenshot.
Now that you have docker installed on your machine, installing LAMP stack is just a matter of running few commands mentioned below. If you don’t understand the command, don’t worry i am going to explain each command step by step:
git clone https://github.com/webmidas/docker-lamp.git cd docker-lamp/ cp sample.env .env // modify sample.env as needed docker-compose up -d // visit localhost
Download LAMP stack from github
Lets start with the first step. Visit this website link to download docker lamp package on your machine. Extract the files to the folder of your choice. Let’s name the folder for example docker-lamp . Go to docker-lamp folder and look for the file sample.env. Rename that file from sample.env to .env and do the configurations as per your need. Sample file already contains pre-configured values. In case you need customization, you can change it as per requirement. Details about configuration values can be obtained from this link.
Open powershell and run the command
Once this is done, open the terminal to run below command to start the containers for LAMP stack. if everything is fine, you will see the success message similar to one shared below.
docker-compose up -dDocker success message for LAMP stack
You can now access the server by typing localhost in your browser. Try docker for your new LAMP stack and enjoy the ride. If you have any question, feel free to comment them below:
Recommend
-
14
Tutorial How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04 MySQL
-
23
Tutorial How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 18.04 MySQL
-
11
Introduction A “LAMP” stack is a group of open source software that is typically installed together in order to enable a server to host dynamic websites and web apps written in PHP. This term is an acronym which represents the
-
8
How To Install LAMP Stack on Fedora 34/33/32/31/30Search ComputingForGeeksIn this blog post, we will look at...
-
14
Install LAMP Stack on UbuntuLAMP stack is an acronym for Linux, Apache, MySQL/MariaDB, and PHP stack. This forms a powerful stack that powers many websites and web applications on the internet. LAMP stack is a combination of the four open-sou...
-
12
This guide will discuss how you as a user can install and setup Apache, MariaDB and PHP ( LAMP Stack) on Ubuntu 20.04 (Focal Fossa) Linux system. LAMP is an acronym for – Linux, Apache, MySQL/MariaDB
-
7
Using a Different System?
-
5
Using a Different System?
-
9
Using a Different System?
-
12
Using a Different System?
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK