Replies: 33 comments 59 replies
-
Install Mark Shust Docker Config for Magento 2 on WSL2Docker Desktop for Windows Requirements
WSL2 Requirements
Instructions
TroubleshootingDocker stuck in 'starting Docker’?
Expected domain (eg. magento2.test) not working?
Notes
|
Beta Was this translation helpful? Give feedback.
-
Thank you for your patience. I'm going to add some notes here based on my findings.
|
Beta Was this translation helpful? Give feedback.
-
Another note, after going to Ubuntu terminal:
(I'm looking to eliminate the host's composer dep, but this is needed in interim) |
Beta Was this translation helpful? Give feedback.
-
How do you do this?
|
Beta Was this translation helpful? Give feedback.
-
Congrats guys! If you still end up encountering issues with WSL2, which I did with an existing project, you can run an Ubuntu VM in Hyper-V Manager to avoid WSL2. Make sure you use the Quick-Create Ubuntu 18.04 feature in Hyper-V to take advantage of enhancements Microsoft made to the VM image. 20.04 is not supported and you may have to use gparted to resize the 16gb disc size or attach a new virtual drive to the vm and mount it. |
Beta Was this translation helpful? Give feedback.
-
Just a quick note, if you are using phpstorm, or another IDE, the path for loading the project is of the form:
Of course, if you are using a different user name or a different path structure, adjust this accordingly. The performance is quite good. I am still working out the best way to sync edits made in the IDE back to the container. Is there a best practise for this already? I was thinking of using something like grunt to watch for changes and use copytocontainer, but maybe there is a better way? I know some other people have spun up an ssh container and then use the IDE's built in ssh based syncing but I am not sure if that's a great idea. Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
Can anyone explain how to setup your Windows IDE (PHPStorm?) with this WSL 2 setup? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
My solution and suggestions to solve the
Install Google Chrome for Linux
This will open Google Chrome in Windows, the Google Chrome is actually running in Ubuntu instance. Note: To run Linux GUI apps on the Windows Subsystem for Linux your OS build has to be 21362+, The current release is 19043 by Microsoft, so one has to join Windows Insider Program and subscribe to the dev channel to get the 21362+ OS build as an update. 2. Get GWSL: 3. WSL2 Ubuntu GUI in Windows: |
Beta Was this translation helpful? Give feedback.
-
I've followed the installation process above but am getting the following error: chmod: cannot access 'bin/magento': No such file or directory Also when bin/setup runs lines 19 removes the src directory which is where the instructions say to install Magento 2 originally? |
Beta Was this translation helpful? Give feedback.
-
Guys, ever ran into issues running WSL2 + VSCode for debugging purposes? |
Beta Was this translation helpful? Give feedback.
-
One more tip. I encountered an issue with Composer getting run from an installed Windows assembly instead of from WSL Distro. The Windows PATH was being appended to Distro PATH and it caused some weird issues. I got around it by adding a /etc/wsl.conf file and adding this config:
Then restart WSL. |
Beta Was this translation helpful? Give feedback.
-
I was able to successfully install docker and download magento using the manual setup instruction on WSL2. Can anyone give me any idea on why this is happening and how I could solve it? Thanks |
Beta Was this translation helpful? Give feedback.
-
Anyone with 403 permission errors may be able to resolve them using the instructions at #757 (comment) |
Beta Was this translation helpful? Give feedback.
-
I want to confirm the one line script works in Windows 11 WSL2, one thing to check if getting errors is that you disable the Windows Firewall and your antivirus Windows firewall seems to block WSL2 from working properly with composer / curl, after I did that it worked. |
Beta Was this translation helpful? Give feedback.
-
Note on line endings from #929 (comment): Avoiding no such file or directory error by changing the line endings to LF from CRLF in all the bash files inside the .\bin\ directory. This can be done with this one-liner inside the project directory:
|
Beta Was this translation helpful? Give feedback.
-
Hello guys! I have a problem understanding certain steps. I am supposed to install ubuntu wsl, windows terminal, docker-desktop, and run the commands in ubuntu terminal, and here comes my confusion, how can ubuntu terminal recognize docker if docker is in the system and windows user and ubuntu runs with a different user? |
Beta Was this translation helpful? Give feedback.
-
The docker daemon is mounted inside of the ubuntu wsl2 vm.
…On Fri, Jun 23, 2023 at 6:50 AM antonio-castillo ***@***.***> wrote:
Hello guys!
I have a problem understanding certain steps.
I am supposed to install ubuntu wsl, windows terminal, docker-desktop, and
run the commands in ubuntu terminal, and here comes my confusion, how can
ubuntu terminal recognize docker if docker is in the system and windows
user and ubuntu runs with a different user?
—
Reply to this email directly, view it on GitHub
<#372 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMQBPNJLJGAMGRVOYPIR7LXMVYHJANCNFSM4WEYIYGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
How do I follow the installation process, but instead of installing an empty site, I'd like to import an existing project from a forked repo in GitHub? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi, I hope you are great, I´m wondering if someone is able to help me with the update, I´m working with WSL2, I ran bin/update and next bin/magento setup:upgrade, but when I run bin/magento --version, the output is magento2.4.6-p2 instead of magento 2.4.6-p3. I´m very grateful for your contributions. |
Beta Was this translation helpful? Give feedback.
-
Running WSL on windows. Installation stops and gives this error - There must be at least 6GB of RAM allocated to Docker in order to continue. I already created .wslconfig file and given 8GB but still it gives the error. plz help. |
Beta Was this translation helpful? Give feedback.
-
My first attempt at setting up a local Magento development environment on my Windows 11 Home PC with WSL2 and Ubuntu. Following the manual setup for existing projects, I have got as far as running bin/copytocontainer --all and the Magento code in folder src clearly isn't copying as it should. I posted under Issues before I spotted this discussion. I've looked through the copytocontainer and docker-compose scripts but, with my limited knowledge, can't work out where it's going wrong. Any tips greatly appreciated. 3/04 update: I realise now, if nothing else, it will be the PHP version probably causing it to fail. My existing Magento version is 2.4.3-p1. I'll upgrade it before trying again. |
Beta Was this translation helpful? Give feedback.
-
I get an issue with running the curl command , when adding -v for verbose this is how the curl command hangs with the last line for the connection left intact.
I am running out of resources on what the issue might be , if anyone has any idea what could be the problem would be very helpful. `curl -v https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash
|
Beta Was this translation helpful? Give feedback.
-
If anyone has issues with WSL2 and the most recent version of PhpStorm, this post may help: https://youtrack.jetbrains.com/issue/IJPL-67729/DockerWSL-PHP-CLI-Interpreter-breaks-due-to-broken-bash-script-in-2024.1 |
Beta Was this translation helpful? Give feedback.
-
Hi and thanks for the Windows info!. I installed all on Windows 10 with WSL2 and inside Ubuntu, as in the post instructions and all works fine except for the speed. It takes around 10 seconds to load a page. Sometimes is much faster (maybe for the caches). What can I check to improve performance? I'm running a 14 core i7 with 32GB RAM so I guess it should be faster. |
Beta Was this translation helpful? Give feedback.
-
Hi all, To anyone who has been working with WSL2; |
Beta Was this translation helpful? Give feedback.
-
Why do you have to map the wsl drive? Isn’t it already available as a pseudo network share under Windows? Also \\wsl$ should work. On Sep 1, 2024, at 9:47 AM, John P. Reilly ***@***.***> wrote:
I do everything in Ubuntu. I also keep everything on WSL filesystem. Originally, I wanted to keep things in Windows, but it was too slow and seemed to sometimes have permissions issues. Now, I map the WSL drive in Windows in order to use some favorite tools (like BeyondCompare) and to do backups.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
this is just so difficult 🤯, I wish there was a dedicated documentation for this |
Beta Was this translation helpful? Give feedback.
-
I know there are those running docker-magento on WSL2.
Be the first to document how to set it up, and if I'm able to replicate it, pick out any course at M.academy and it's yours for free.
Beta Was this translation helpful? Give feedback.
All reactions