i have a windows 7 machine with docker tool box installed
i downloaded image and running container which have adb installed in it from below link
-p 5037:5037
is for seeing devices whis is running on container when typing adb devices
on the host. But you would see devices connected on the host when you type adb devices
in the container. For this
$ ssh -T -N -L5037:127.0.0.1:5037 root@host.ip
host.ip may be: 192.168.0.10
/etc/ssh/sshd_config
file). Run like:
$ ssh -T -N -R5037:127.0.0.1:5037 root@127.0.0.1 -p 5022
in your host for remote forwarding.Before one option of two, you shoul map the port 8081 on your host like: -p8081:8081
So you just need to run:
docker run -p8081:8081 android_container
then
docker exec -it 9ba51613a7be adb devices
if you forwarded ports.
You have also another solution for this. Please check this repo: RN-Container-with-ADB-Real-Device
Just to add conclusion of this question.
Till date,I was not able to find a feasible solution to run windows docker on windows 7 machine. Most of the posts have been around windows docker with windows 10 and windows 2016 Server.
I switched to Linux docker on windows 7 machine, However the adb devices were still not recognized on Linux container
Lastly , i had to go for Linux host and Linux Container and the devices were visible on container.