Skip to content

Pinging / Accessing WSL2 IP from a docker container #7066

Answered by addshore
addshore asked this question in Q&A
Discussion options

You must be logged in to vote

After trying a variety of debugging etc I ended up uninstalling and reinstalling docker, and everything seems to start working just fine again.

The issue was caused by subnet differences between WSL and docker.

By default, as far as I can tell WSL & Docker so something special together so that containers end up with an IP on the same subnet as WSL.
For some reason my setup was not doing this.
After reinstalling my containers end up with a bridge network again with 172. IPs (same as WSL). Prior to this the containers were getting 192. IPs.

The added confusion comes from the default docker subnet, and also seemingly configured docker subnet in the UI


To make this issue even more searchabl…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@saschanockel
Comment options

@worthwhileindustries
Comment options

@tomsit-ionos
Comment options

Answer selected by addshore
Comment options

You must be logged in to vote
1 reply
@worthwhileindustries
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants