

Phpstorm wsl2 code#
Visual Studio Code architecture is based on a client/server approach where pretty much everything except rendering and input processing is done in a server process, while the UI itself runs in a client process. If your IDE is Visual Studio Code, using Remote to WSL is the best way to continue working on your project.

If you want an IDE for editing your files, you can do that even if they are hosted within your WSL 2 distro.
Phpstorm wsl2 windows#
Also, that means that you won’t experience issues with different line endings between Windows and Mac/Linux users! What about my IDE?

This means that Windows-specific scripts don’t need to be maintained anymore. They are often using less polished versions of those scripts, and have to deal with subtle behavioral differences.īy fully embracing WSL 2, Windows developers can use the exact same build and automation scripts as on Linux. Those scripts are often developed for Linux first (because most of the time, CI/CD pipelines for those projects run on Linux), and developers running on Windows are often considered second-class citizens. Most reasonably sized projects involving Linux containers come with a bunch of automation scripts. Compatibility with Linux toolchains and build scripts This means that when you mount your project files in a container (with docker run -v ~/my-project:/sources ), docker will propagate inotify events and share the same cache as your own distro to avoid reading file content from disk repeatedly.Ī little warning though: if you mount files that live in the Windows file system (such as with docker run -v /mnt/c/Users/Simon/windows-project:/sources ), you won’t get those performance benefits, as /mnt/c is actually a mountpoint exposing Windows files through a Plan9 file share. Docker Desktop leverages that to handle bind mounts from a WSL 2 distro without involving any remote file sharing system. They just run in separate namespaces so that they have the illusion of running totally independently. They share the same Kernel, VFS cache etc. Running docker CLI from WSL will bring you… Awesome mounts performanceīoth your own WSL 2 distro and docker-desktop run on the same utility VM. Your project files should be stored within your WSL 2 distro of choice, you should run the docker CLI from this distro, and you should avoid accessing files stored on the Windows host as much as possible.įor backward compatibility reasons, we kept the possibility to interact with Docker from the Windows CLI, but it is not the preferred option anymore. The first and most important best practice we want to share, is to fully embrace WSL 2. We focused on compatibility to keep you happy with your current development workflow.īut to get the most out of Windwe have some recommendations for you. We and our early users have accumulated some experience working with it and are excited to share a few best practices to implement in your Linux container projects!ĭocker Desktop with the WSL 2 backend can be used as before from a Windows terminal.
Phpstorm wsl2 for windows 10#
Docker Desktop WSL 2 backend has now been available for a few months for Windows 10 insider users and Microsoft just released WSL 2 on the Release Preview channel (which means GA is very close).
