Make sure you have latest docker installed on mac.
docker-machine --version
docker-machine version 0.16.1, build cce350d7
Create a docker-machine
docker-machine create --driver virtualbox appium-machine
Enable USB in created docker-machine
docker-machine stop appium-machine
vboxmanage modifyvm appium-machine --usb on --usbehci on
docker-machine start appium-machine
Note: You need to install Extension Pack depends on your virtualbox version, in case you get an Error "Implementation of the USB 2.0 controller not found"
Open Virtual box, navigate to appium-machine created, select Ports, select USB and add Android device.
Kill adb server from the base machine
adb kill-server
SSH into the docker machine created
docker-machine ssh appium-machine
Run the docker image on the newly created docker machine
docker run --privileged -d -p 4723:4723 -v /dev/bus/usb:/dev/bus/usb --name container thenishant/appium
Run adb devices command to verify adb can detect the connected android device.
docker exec -it container adb devices
Copy the apk file from host machine to the vm machine
docker cp /Users/loacl-macosx-path-to-apk/app-debug.apk container:/opt
Run this command to get the ip address of the docker machine
docker-machine ip container
Content type
Image
Digest
Size
580 MB
Last updated
almost 7 years ago
docker pull thenishant/appium