Setup local wsl instance for development
Run 1-setup-wsl.ps1
This script will update the WSL engine, download a custom kernel, configure WSL network options and fix nvidia driver linking issues. Then it will install Docker, MicroK8S and then will configure Kubernetes.
Run 2-setup-local.ps1
This script will download Docker CLI, Docker Compose and Docker BuildX. It will configure Docker CLI to use Docker running on WSL. It will setup and configure Unbound to wildcard dns domains to ingress running in Kubernetes on WSL.
Run wsl --unregister Ubuntu-22.04
To set overriden variables:
wsl
cd $HOME/localdev-wsl-overrides
- Configure as required
Will need to modify devcontainer.json
by changing source=/mnt/c/data/localdev-wsl,target=/src,type=bind
to your project path source=/mnt/c/< your path>/localdev-wsl,target=/src,type=bind
Most of the code comes from: https://github.com/jasonwc/setup