How to install Magento 2 with Docker Compose on Windows 10 Pro - Magento Source24

 

How to install Magento 2 with Docker Compose on Windows 10 Pro.
How to install Magento 2 with Docker Compose on Windows 10 Pro.

How to install Magento 2 with Docker Compose on Windows 10 Pro


Hi Friends Today i'm share with you Guys,How to install Magento 2 with Docker Compose on Windows 10 Pro.


You have a computer using the Operation system Windows 10 Professional, you are using the XAMPP or Vagrant for developing Magento 2, you see it working very slowly, you can't complete your tasks fast. 


👉 Then you are searching for another platform replacing XAMPP or Vagrant to work faster on Windows 10 Pro.


Today, I show you the Docker software, this software will help you to develop Magento 2 faster than XAMPP and Vagrant, I think it is faster 80 percent. Also, you can be used the Ubuntu directly on the Operation system Windows for developing Magento 2 by using the Docker.


Before doing this practice, you must sure your computer meets the following requirements.


The basic System Requirements:

➤ Windows 10 64bit: Pro, Enterprise or Education (1607 Anniversary Update, Build 14393 or later). You can check Windows 10 Build Version on your computer by going to Run → enter the winver.

➤  Virtualization is enabled in BIOS. Typically, virtualization is enabled by default. This is different from having Hyper-V enabled. For more detail see Virtualization must be enabled in Troubleshooting.

https://docs.docker.com/docker-for-wi...

➤ At least 4GB of RAM. (I had 12GB of RAM)

➤ Git is installed on Windows 10 Pro, go to the link for downloading https://git-scm.com/download/win (I installed the Git on my computer)

➤ Docker Community Edition 17.06.2-ce-win27 is installed, go to the link for downloading https://docs.docker.com/docker-for-wi...


What will I do in this video?


👉 I skip the step of installing Git on Windows 10 Pro 64 bit.

👉 I skip the step of enabling the Virtualization on my computer.

➤ Two these steps, I did it.

👉 I install Docker CE 17.06.2 on the Windows 10 Pro 64bit

👉 I create the docker containers from docker-compose.yml

👉 I install Magento 2.2.6 with Docker


➤ let's go.


Let's do this practice, you need to follow steps by step:


👉 Step 1: Install Docker CE 17.06.2 on the Windows 10 Pro 64bit

Go to the link https://docs.docker.com/docker-for-wi... for downloading the docker CE 17.06.2


👉 Step 2: Create the docker containers from docker-compose.yml

➤ Before creating the docker containers, you must share the local drives where you will save the source codes for your projects. Go to Docker → Settings → Shared Drivers, select the local drives you want to be available to your containers.

➤ Move to the local drive that you are working on it, don't use the C drive, because all your data will be lost if you re-install windows.

➤ Git clone https://github.com/php-cuong/docker-m...

➤ Open the docker-compose.yml file and change volumes following the path on your computer

➤ Create the docker containers from docker-compose.yml file

Run the command line: docker-compose up -d

➤ Let's see the images on your computer

Run the command line: docker images

➤ Let's see the containers on your computer

Run the command line: docker ps -a


👉 Step 3: Install Magento 2.2.6 with Docker


➤ Before downloading and installing Magento 2.2.6, you must sure the server meet the minimum following requirements:


Apache 2.4

MySQL 5.7

PHP 7.0.13–7.0.x or 7.1.x

 

➤ Accessing the server where you will install Magento 2.2.6 : 


1. Where having the PHP, Apache2, Webmin : 

Run the command line: docker exec -it apache2_service bin/bash

php -v, apache2 -v

Webmin: https://127.0.0.1:10000

username: root

password: root


2. Where having the MySQL : 

Run the command line: docker exec -it mysql_service bin/bash

Run the command line: mysql -u root -p, enter the password "giaphugroup" Create the new database named magento_2_2_6


- Install Magento 2.2.6

On your browser, press http://magento-en.2.2.6.giaphugroup.com

The information for connecting to mysql.

host: mysql

username: root

password: giaphugroup

database: magento_2_2_6

- Deploy static content


SSH to the container named apache2_service: docker exec -it --user www-data apache2_service bin/bash

Run the following command lines:

php bin/magento setup:static-content:deploy -f




Deepak Kumar Bind

Success is peace of mind, which is a direct result of self-satisfaction in knowing you made the effort to become the best of which you are capable.

Post a Comment

If you liked this post please do not forget to leave a comment. Thanks

Previous Post Next Post