-
-
Notifications
You must be signed in to change notification settings - Fork 42
using wrong port in WSL #168
Description
I have a project using a configuration below to use port 2222 instead of port 22. I currently use WSL to do local development (it works on through the github CI).
Currently when I run this on WSL, it tries to use port 22 instead of port 2222.
docker_port_bindings:
22/tcp:
- HostPort: '2222'
HostIp: '127.0.0.1'
If I comment out the || ENV.fetch('WSLENV', nil) statement below it works fine.
beaker-docker/lib/beaker/hypervisor/docker.rb
Lines 128 to 130 in 299b9c0
| def nested_docker? | |
| ENV['DOCKER_IN_DOCKER'] || ENV.fetch('WSLENV', nil) | |
| end |
I'm not 100% sure why WSL is being treated as the same as nested docker, but I don't think it should be. Seems to me that you should have a wsl? check for IP issues specifically.
Happy to try to supply a patch, but I'm not clear on what #56 solved.
Expected behavior
When specifying HostPort 2222, it should use port 2222.
Actual behavior
It continues to use port 22 instead of 2222.
Versions tested
2.6.0.