- Install WSL 2
- Install Ubuntu (or other distro) into WSL
- Place your project files in Linux inside WSL using path like
\\wsl$\Ubuntu\home\username\Work
. You can access them from using Explorer since it's network location for Windows. Just Enter\\wsl$\
into location bar and you will see available WSL locations. - Open it in JetBrains IDE
- Install Docker Desktop for Windows
- Enable WSL 2 support in Docker Dashboard Settings
- Open WSL Command Line, go to project folder and initialize Docker configuration. For example:
docker-compose up -d
. - Now you can see Docker Desktop give you access to containers you just build.
- Now you can work with containers into JetBrains IDE Services pane, connecting to Docker daemon using "Docker for Windows" option.
TIP after installing Docker Desktop, you can notice you can open Docker frontend in browser, but not frontend from WSL (like npm run start
). To fix that, create .wslconfig
file in your home folder (C:\Users\username
) and fill it:
[wsl2]
memory=4GB
swap=0
localhostForwarding=true
The key you want to change is localhostForwarding
.
Found it here.
Top comments (0)