Skip to content

Instantly share code, notes, and snippets.

@PawelHaracz
Created August 12, 2024 16:03
Show Gist options
  • Save PawelHaracz/faf7ed5f7532fe81a43ca8f7d0d29a0c to your computer and use it in GitHub Desktop.
Save PawelHaracz/faf7ed5f7532fe81a43ca8f7d0d29a0c to your computer and use it in GitHub Desktop.
#https://medium.com/@ferarias/docker-in-windows-11-using-wsl2-8e30faddc32c
$wslip = wsl -- ip -o -4 -json addr list eth0 | ConvertFrom-Json | %{ $_.addr_info.local } ` | ?{ $_ }
Write-Host "Setting Docker context 'wsl' to host=tcp://$($wslip):2375"
docker context update wsl --docker "host=tcp://$($wslip):2375"
docker context use wsl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment