|
1 | 1 | # docker-magento2-lamp
|
2 |
| -How to install Magento 2 on Docker container |
3 |
| - |
4 |
| -## Requirements |
5 |
| -You need to install [docker](https://store.docker.com/editions/community/docker-ce-desktop-windows) |
6 |
| -Double-click InstallDocker.msi to run the installer. |
7 |
| - |
8 |
| -Docker Magento 2 LAMP included |
9 |
| - - Apache 2.4.18 |
10 |
| - - PHP 7.0.18 |
11 |
| - - MySQL 5.7.18 |
12 |
| - - host: localhost |
13 |
| - - post: 3306 |
14 |
| - - username: root |
15 |
| - - password: giaphugroup |
16 |
| - - Webmin 1.840 |
17 |
| - - https://localhost:10000 |
18 |
| - - username: root |
19 |
| - - password: root |
20 |
| - - phpmyadmin 4.7.1 |
21 |
| - - http://localhost:8080 |
22 |
| - - username: root |
23 |
| - - password: giaphugroup |
24 |
| - - Composer |
25 |
| - - Git |
26 |
| - |
27 |
| -Used for Magento 1 and Magento 2 |
28 |
| - |
29 |
| -## See the video How to Install Magento 2 with Docker container on Windows 10 |
30 |
| -[https://www.youtube.com/watch?v=w7YV2pyN9d4](https://www.youtube.com/watch?v=w7YV2pyN9d4) |
31 |
| - |
32 |
| -## Installing |
33 |
| - |
34 |
| -### Step 1: Install the Docker container |
35 |
| - |
36 |
| - - Git clone https://github.com/php-cuong/docker-magento2-lamp.git |
37 |
| - - Open the docker-compose.yml file and change volumes following the path on your computer, if you enjoy. |
38 |
| - - On your Windows 10 press the Windows+S keys to open search. |
39 |
| - - Type cmd and Run as administrator |
40 |
| - - Switch to the path contains the data git clone. |
41 |
| - - Run the following command line: |
42 |
| - - docker pull phpcuong/magento2-apache2 |
43 |
| - - docker-compose up -d |
44 |
| - - The additional information, run the following command line: |
45 |
| - - docker images |
46 |
| - - docker ps -a |
47 |
| - - docker-compose ps |
48 |
| - |
49 |
| -### Step 2: Install Magento 2 on Docker container. |
50 |
| - |
51 |
| -1. Create a host for running Magento 2 |
52 |
| - |
53 |
| - - On your Windows 10, go to the path C:\Windows\System32\drivers\etc, open the hosts file |
54 |
| - - Insert the new row: 127.0.0.1 magento.giaphugroup.com and press the ctrl + s for saving the new data. If you can't save the hosts file, please change the permission. |
55 |
| - - On your browser, press https://localhost:10000, log in with the account information: |
56 |
| - - Username: root |
57 |
| - - Password: root |
58 |
| - - Create new virtual host |
59 |
| - |
60 |
| -2. Download Magento 2. |
61 |
| - |
62 |
| - - See https://magento.com/tech-resources/download |
63 |
| - - You need to have an account here, please sign up if you have not yet. |
64 |
| - - Download the Magento 2 latest. |
65 |
| - - Copy the Magento zip file to the path, where magento.giaphugroup.com point to |
66 |
| - - Unzip the Magento zip file. |
67 |
| - |
68 |
| -3. Create a database |
69 |
| - |
70 |
| - - On your browser, press https://localhost:8080, log in with the account information: |
71 |
| - - Username: root |
72 |
| - - Password: giaphugroup |
73 |
| - - Create the database name magento.2.1.7. |
74 |
| - - Another way, I use the HeidiSQL software connect to mysql on my localhost |
75 |
| - - If you do not install this software yet, please see https://www.heidisql.com/download.php |
76 |
| - |
77 |
| -4. Install Magento 2 |
78 |
| - |
79 |
| - - On your browser press http://magento.giaphugroup.com |
80 |
| - - The information for connecting to mysql. |
81 |
| - - host: mysql |
82 |
| - - username: root |
83 |
| - - password: giaphugroup |
84 |
| - - database: magento.2.1.7 |
85 |
| - - Finish the steps for installing Magento 2. |
86 |
| - |
87 |
| -### Step 3: ssh into the apache2_service container |
88 |
| - |
89 |
| - - docker exec -it apache2_service bin/bash |
90 |
| - - cd /var/www/html/ |
91 |
| - - php bin/magento setup:static-content:deploy |
92 |
| - - php bin/magento cache:flush |
93 |
| - - php bin/magento cache:clean |
94 |
| - |
95 |
| -### Step 4: Test and see the results |
96 |
| - |
97 |
| -## 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. |
98 |
| - |
99 |
| -### Contact with the owner of this extension |
100 |
| - - skype: cuongnq87 |
101 |
| - - facebook: https://www.facebook.com/giaphugroupcom/ |
102 |
| - |
| 2 | +How to install Magento 2 with Docker Compose on Windows 10 Pro |
| 3 | + |
| 4 | +Hi everybody, I am Cuong, Welcome back to my Magento 2 tutorial video series. |
| 5 | + |
| 6 | +Today, I am going to show everybody the best practice, How to install Magento 2 with Docker Compose on Windows 10 Pro. |
| 7 | + |
| 8 | +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. |
| 9 | + |
| 10 | +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. |
| 11 | + |
| 12 | +Before doing this practice, you must sure your computer meets the following requirements. |
| 13 | + |
| 14 | +## The basic System Requirements: |
| 15 | +- 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. |
| 16 | +- 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. |
| 17 | +https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization-must-be-enabled |
| 18 | +- At least 4GB of RAM. |
| 19 | +- Git is installed on windows 10 Pro, go to the link for downloading https://git-scm.com/download/win |
| 20 | +- Docker Community Edition 17.06.2-ce-win27 is installed, go to the link for downloading https://docs.docker.com/docker-for-windows/release-notes/#docker-community-edition-17062-ce-win27-2017-09-06 |
| 21 | + |
| 22 | +What will I do in this video? |
| 23 | + |
| 24 | +1. I skip the step installing Git on windows 10 Pro 64 bit. |
| 25 | +2. I skip the step enabling the Virtualization on my computer. |
| 26 | +3. I install Docker CE 17.06.2 on the Windows 10 Pro 64bit |
| 27 | +4. I create the docker containers from docker-compose.yml |
| 28 | +5. I install Magento 2.2.6 with Docker |
| 29 | + |
| 30 | +Okie, let's go. |
| 31 | + |
| 32 | +Let's do this practice, you need to follow steps by step: |
| 33 | + |
| 34 | +## Step 1: Install Docker CE 17.06.2 on the Windows 10 Pro 64bit |
| 35 | +Go to the link https://docs.docker.com/docker-for-windows/release-notes/#docker-community-edition-17062-ce-win27-2017-09-06 for downloading the docker CE 17.06.2 |
| 36 | + |
| 37 | +## Step 2: Create the docker containers from docker-compose.yml |
| 38 | +- 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. |
| 39 | +- 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. |
| 40 | +- Git clone https://github.com/php-cuong/docker-magento2-lamp.git |
| 41 | +- Open the docker-compose.yml file and change volumes following the path on your computer |
| 42 | +- Create the docker containers from docker-compose.yml file |
| 43 | +Run the command line: docker-compose up -d |
| 44 | +- Let's see the images on your computer |
| 45 | +Run the command line: docker images |
| 46 | +- Let's see the containers on your computer |
| 47 | +Run the command line: docker ps -a |
| 48 | + |
| 49 | +## Step 3: Install Magento 2.2.6 with Docker |
| 50 | +- Before downloading and installing Magento 2.2.6, you must sure the server meet the minimum following requirements: |
| 51 | +Apache 2.4 |
| 52 | +MySQL 5.7 |
| 53 | +PHP 7.0.13–7.0.x or 7.1.x |
| 54 | +- Accessing the server where you will install Magento 2.2.6 |
| 55 | +1. Where having the PHP, Apache2, Webmin |
| 56 | +Run the command line: docker exec -it apache2_service bin/bash |
| 57 | +php -v, apache2 -v |
| 58 | +Webmin: https://127.0.0.1:10000 |
| 59 | +username: root |
| 60 | +password: root |
| 61 | + |
| 62 | +2. Where having the MySQL |
| 63 | +Run the command line: docker exec -it mysql_service bin/bash |
| 64 | +Run the command line: mysql -u root -p, enter the password "giaphugroup" |
| 65 | +Create the new database named magento.2.2.6 |
| 66 | +- Downloading the Magento 2.2.6, go to the link https://magento.com/tech-resources/download |
| 67 | +- On your windows, move to the D drive, create the folder named magento/2.2.x/2.2.6, then copy the zip file just downloaded to this folder and unzip the file. |
| 68 | +- Create a host for running Magento 2.3 |
| 69 | +On your Windows 10 Pro 64bit, go to the path C:\Windows\System32\drivers\etc, open the hosts file |
| 70 | +Insert the new row: 127.0.0.1 magento-en.2.2.6.giaphugroup.com and press the ctrl + s for saving the new data. If you can't save the hosts file, please change the permission. |
| 71 | +On your browser, press https://localhost:10000, log in with the account information: |
| 72 | +Username: root |
| 73 | +Password: root |
| 74 | +Then Go to the Webmin → Servers → Apache Webserver → Create virtual host → Create a New Virtual Server |
| 75 | +- Accessing the container has the PHP, Apache2, Webmin. Then restart apache2 |
| 76 | +Run the command line: service apache2 restart |
| 77 | +- Install Magento 2.2.6 |
| 78 | +On your browser, press http://magento-en.2.2.6.giaphugroup.com |
| 79 | +The information for connecting to mysql. |
| 80 | +host: mysql |
| 81 | +username: root |
| 82 | +password: giaphugroup |
| 83 | +database: magento.2.2.6 |
| 84 | +- Deploy static content |
| 85 | +Run the command line: php bin/magento setup:static-content:deploy |
| 86 | + |
| 87 | +## Let's install the sample data for Magento 2 please see the practice http://bit.ly/2OKBBwK |
| 88 | + |
| 89 | +Thank you for your watching. If you have any questions about this practice, please feel free to leave a comment below. |
| 90 | + |
| 91 | +Don't forget to like, comment, share my videos and subscribe to my channel for getting the latest videos. |
| 92 | + |
| 93 | +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. |
0 commit comments