google / android-emulator-container-scripts

Apache License 2.0
1.89k stars 266 forks source link

How to run the emulator in Docker swarm mode #167

Open copiltembel opened 4 years ago

copiltembel commented 4 years ago

I have tried running the image created by this script using a Docker service:

$ docker service create --replicas 1 --name t1 -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -e "EMULATOR_PARAMS=-gpu host" --device /dev/kvm --publish 8554:8554/tcp --publish 5555:5555/tcp q-google-x86-gpu:30.0.12

But there are multiple problems:

  1. -v is not supported by Docker services
  2. --device is not supported by Docker services

Do you have any idea how I could achieve running the emulator in Docker service?

pokowaka commented 4 years ago

It looks like there are 2 challenges:

copiltembel commented 4 years ago

Yep, it's really just the devices (/dev/kvm in this case) that don't work.