• Ashish Jha's Official Blog
  • ask[@]ashishjha.com

ashish-jha

  • Home
  • Advertise
  • Blog
    • Technology
      • Cloud
      • Devops
      • Hacking
      • Security
      • WordPress
    • Software Development
      • PHP
    • Make Money
      • Blogging
      • Business
      • Domaining
    • Mindset
      • Spiritual
      • Motivation
      • India
    • General
      • Finance
      • Education
      • Health
  • Contact Us
  • Site Map
✕

How to install Lamp stack using Docker

  • Home
  • Blog
  • Technology Security
  • How to install Lamp stack using Docker
June 27, 2020
Categories
  • Security
  • Technology
Tags

Jump Directly To

    • 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?
  • Download LAMP stack from github
  • Open powershell and run the command

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 -d
Docker 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:

Ashish Jha
Ashish Jha
I am Ashish Jha, Blogger at ashishjha.com blog. I use this blog to write about the things i like and explore. I share my everyday learning experiences with my readers through this blog. I love to answers concerns of my users and readers which you can ask through contact us form located at contact us page of the blog.

Related posts

January 9, 2021

How to Use Sessions Correctly for Persistent Login?


Read more
January 7, 2021

How to add custom folders to one drive?


Read more
January 4, 2021

How To Use Web Cookies Securely?


Read more

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

✕

Categories

  • Basics
  • Blogging
  • Business
  • Databases
  • Devops
  • Domaining
  • Education
  • General
  • Hacking
  • Motivation
  • PHP
  • Sales
  • Security
  • SEO
  • Software Development
  • Technology
  • Wordpress

Recent Posts

  • 0
    An Introduction to Databases
    January 12, 2021
  • 0
    Single Sign On
    January 12, 2021
  • 0
    Installation Of Nginx on Ubuntu 20
    January 11, 2021
  • 0
    JSON
    January 10, 2021
  • 0
    How to Use Sessions Correctly for Persistent Login?
    January 9, 2021

Recent Comments

  • May 23, 2018

    Ashish Jha commented on Should I Call Or Email?

  • May 23, 2018

    Ashish Jha commented on Importance of Education



Recently Added

  • 0
    An Introduction to Databases
    January 12, 2021
  • 0
    Single Sign On
    January 12, 2021
  • 0
    Installation Of Nginx on Ubuntu 20
    January 11, 2021

Worth A Visit

  • Home
  • Advertise
  • Blog
  • Contact Us
  • Site Map

More

  • Who Am I?
  • Community Services
  • Contact Us
  • Business
  • Motivation

Ashish Jha

This is my personal blog where i share my personal views about life and tech explorations.  I always work hard to bring the best & truthful facts through this blog. But, again i disclaim being an authority on any subject. I love learning new things and sharing them with my readers.

Note: Whatever i write on this blog are totally my experiences. If you don’t agree, Simply ignore them and move ahead in life. 

© 2007 - 2022. Ashishjha.com


    This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.