Error on command docker run

Hello everyone.
When I run this command: docker run --rm -it -p 3000:80 -p 2525:25 rnwood/smtp4dev
i’m getting this error:
docker: Error response from daemon: driver failed programming external connectivity on endpoint sharp_moser (10f32f11e2e027881c27468d421f1d767c2001a37a422b3a22b89f1f45cd7192): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3000 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: Invalid argument. Run `dmesg’ for more information.

If i run the command ‘dmesg’, it returns this message:
[ 0.088379] <3>init: (1) ERROR: ConfigInitializeCommon:665: Failed to mount /usr/lib/wsl/drive
[ 0.088383] : 19
[ 0.088450] <3>init: (1) ERROR: ConfigInitializeCommon:665: Failed to mount /usr/lib/wsl/lib
[ 0.088453] 19

Can someone help me with this error? I’m in a linux VM in Windows 10.
Thank you

The first think that commes to mind is a collision between the network WSL uses and the network docker0 is attached to.

Just execute ip a and see if both interfaces have a 172.17.0.x ip.

IP collision is a common problem indeed, but in this case

does not seem to be an IP problem. The iptables fails because of an invalid argument. It wouldn’t happen in case of a wrong IP address.

That “VM” is a WSL distribution. Is it WSL1 or WSL2? If WSL1, that will not support running Docker and you need to switch to WSL2.

Thank you for your help! that was the problem was wsl1 instead of wsl 2