docker-android/docker.tf

45 lines
1,004 B
Terraform
Raw Normal View History

2018-09-27 14:12:03 +01:00
provider "docker" {
host = "unix:///var/run/docker.sock"
}
resource "docker_image" "selenium_hub_img" {
name = "selenium/hub:3.14.0-curium"
}
resource "docker_image" "docker_android_img" {
name = "butomo1989/docker-android-x86-8.1:latest"
}
resource "docker_network" "private_network" {
2018-09-27 14:13:46 +01:00
name = "private_network"
2018-09-27 14:12:03 +01:00
}
resource "docker_container" "selenium_hub_con" {
image = "${docker_image.selenium_hub_img.latest}"
name = "selenium_hub_con"
networks = ["${docker_network.private_network.id}"]
ports {
internal = 4444
external = 4444
}
}
resource "docker_container" "samsung_s6_con" {
image = "${docker_image.docker_android_img.latest}"
name = "samsung_s6_con"
privileged = true
depends_on = ["docker_container.selenium_hub_con"]
networks = ["${docker_network.private_network.id}"]
ports {
internal = 6080
external = 6080
}
env = [
"DEVICE=Samsung Galaxy S6",
"CONNECT_TO_GRID=true",
"APPIUM=true",
2018-09-27 14:13:46 +01:00
"MOBILE_WEB_TEST=true",
"AUTO_RECORD=true"
]
2018-09-27 14:12:03 +01:00
}