How to install Magento 2 with Docker Compose on Windows 10 Pro
Hi everybody, I am Cuong, Welcome back to my Magento 2 tutorial video series. #Magento2Tutorial #Magento2WithDocker
Today, I am going to show everybody the best practice, 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.
– At least 4GB of RAM. (I had 12GB of RAM)
– Git is installed on Windows 10 Pro, go to the link for downloading (I installed the Git on my computer)
– Docker Community Edition 17.06.2-ce-win27 is installed, go to the link for downloading
What will I do in this video?
1. I skip the step of installing Git on Windows 10 Pro 64 bit.
2. I skip the step of enabling the Virtualization on my computer.
Two these steps, I did it.
3. I install Docker CE 17.06.2 on the Windows 10 Pro 64bit
4. I create the docker containers from docker-compose.yml
5. I install Magento 2.2.6 with Docker
Okie, 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 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
– 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:
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
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
The information for connecting to mysql.
– 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
Let’s install the sample data for Magento 2 please see the practice
Don’t forget to like, comment, share my videos and subscribe to my channel for getting the latest videos.
Please do not hesitate to contact me, if you need me to join your Magento project. My rate is $25/hour in Magento 1 and $30/hour in Magento 2.
If you are searching for installing Magento 2.3 see this tutorial