Closed b166er closed 1 year ago
closed without changes? can you please explain why?
This is not something that we need ourselves, we haven't had time to build it for you, and in the past 1.5+ years that this ticket has been open no one else seems to have needed it either.
That said, if you'd like to take a crack at improving this, feel free to submit a pull request and we'll take a look!
my docker Container based from "webdevops/php-nginx:8.0" with some modifications like installing "ncat" and "procps"
here my docker run:
docker run --rm -d --net mynet --ip 172.15.0.1 --hostname mydev --name mydev -p 1881:80 -e WEB_DOCUMENT_ROOT=/app/public -v ${pwd}:/app mytest_container
i run my custom command:
docker exec mydev php /app/artisan test:start -vvv
my test console-command:will generate and execute this command in docker container locally:
/usr/bin/ssh -o StrictHostKeyChecking=no -N -i /app/test.key -L 13306:127.0.0.1:3306 -p 22 john@my-server
i start this command manually in docker-container with "-v" verbose, here is the result:i found the problem in this line:
debug1: Local connections to LOCALHOST:13306 forwarded to remote address 127.0.0.1:3306
docker cannot bind port to localhost or 127.0.0.1, they need a docker-ip, so i extended the sshCommand in class CreateTunnel:__construct() to a custom-address for local binding:
before:
after:
result:
/usr/bin/ssh -o StrictHostKeyChecking=no -N -i /app/test.key -L 172.15.0.1:13306:127.0.0.1:3306 -p 22 john@my-server
and now it works!can you please provide an update with this fix. Thank you!
PS: btw,