Skip to content

Commit 961820f

Browse files
budtmoSrinivasanTarget
authored andcommitted
Added docker compose file (#48)
* Added docker compose file * Added documentation to use compose file
1 parent 64a5faf commit 961820f

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,10 @@ Appium-Docker-Android can be connected with selenium grid by passing following p
9090
```
9191
$ docker run --privileged -d -p 4723:4723 -e CONNECT_TO_GRID=True -e APPIUM_HOST="127.0.0.1" -e APPIUM_PORT=4723 -e SELENIUM_HOST="172.17.0.1" -e SELENIUM_PORT=4444 -v /dev/bus/usb:/dev/bus/usb --name container-appium appium/appium
9292
```
93+
94+
### Docker compose
95+
There is [an example of compose file](docker-compose.yml) to simulate the connection between selenium hub and appium server mit connected device(s) in docker solution.
96+
97+
```
98+
$ docker-compose up -d
99+
```

docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Note: It requires docker-compose 1.6.0+
2+
#
3+
# Usage: docker-compose up -d
4+
version: '2'
5+
6+
services:
7+
# Selenium hub
8+
selenium_hub:
9+
image: selenium/hub:3.4.0
10+
ports:
11+
- 4444:4444
12+
13+
# Appium Docker Android
14+
appium_devices:
15+
image: appium/appium
16+
depends_on:
17+
- selenium_hub
18+
network_mode: "service:selenium_hub"
19+
privileged: true
20+
volumes:
21+
- /dev/bus/usb:/dev/bus/usb
22+
environment:
23+
- CONNECT_TO_GRID=True
24+
- SELENIUM_HOST=selenium_hub

0 commit comments

Comments
 (0)