Skip to content

Docker

Docker provide a platform for operating system level virtualization enabling delivery of software packages or 'images' in isolated environments or 'containers' which include all of the required library dependencies and configuration. Containers can be networked and communicate with each other to form complex distributed applications which can be run locally or in the cloud.

Personal Experience

N/A

Tools & Software Integrations

N/A

N/A

Resources

N/A

Notes and Troubleshooting

Accessing Docker Containers in WSL on Windows from your local area network (LAN)

Containers can be run in Linux on a Windows machine using WSL2. However, WSL2 has a virtualized ethernet adapter with its own unique IP address. Ports in WSL2 aren't automatically forwarded to corresponding ports on the Windows host machine: https://learn.microsoft.com/en-us/windows/wsl/networking

This can be done with Netsh portproxy:

  1. Start powershell in Windows with admin privileges.
  2. Forward port 8080 using netsh:
netsh interface portproxy add v4tov4 listenport=8080 listenaddress=0.0.0.0 connectport=8080 connectaddress=$($(wsl hostname -i).Trim());
  1. Check active portproxys:
netsh interface portproxy show v4tov4
  1. If required delete the port proxy:
netsh interface portproxy delete v4tov4 listenaddress=0.0.0.0 listenport=8080

Source: https://youtu.be/6XIewWXXSNs