With many thanks to this brilliant article from Kiran Randhawa.
I have worked years with Developent Containers using only Docker. Recently I started working with WSL integration. Not only my Hot Reload issue is solved, the performance gain is staggering.
If you have never setup this before, in Windows 11:
- Run Powershell as Admin, and run
wsl --install- Start the Microsoft Store - type "store" in your taskbar, and search for "Ubuntu", I installed "Ubuntu 20.04.6 LTS" (Debian did not work for me);
- Start Ubuntu, create your account;
- Create a
reposfolder and withing this folder, clone this repository; - Install Docker Desktop on Windows;
- In docker desktop, open the settings with the cog-wheel icon;
- Section "General", check "Use the WSL 2 based engine" and the sub-option "Add the *.docker.internal names..."
- Section "Resources | WSL integration", enable the switch for Ubuntu, this comes with the Ubuntu installation. Press button "Apply and Restart"
- Start VS Code, and with the blue button at the left bottom, connect to WSL with distribution, choose Ubuntu;
- Choose folder
reposand then the subfolder with this repositor; - When asked, press the button "Open folder in Dev Container";
- After opening in Dev Container, the environment will install all prerequisites to run this repository;
Ready to go!
The installed environment includes:
- Node with Typescript;
- Terraform;
- AWS CLI;
Tip!
Install the "Draw.io Integration" plugin from Henning Dieterichs to view .drawio files.