Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate the possibility to run emulators through Docker #61

Open
vincentbrison opened this issue May 14, 2020 · 7 comments
Open

Evaluate the possibility to run emulators through Docker #61

vincentbrison opened this issue May 14, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@vincentbrison
Copy link
Contributor

Running Android emulator through Docker seems possible, for instance with this repo https://github.com/budtmo/docker-android.

Even if running emulator on CI is far from optimal, as solution like Firebase Test Lab are far more efficient in time and ressource, the ability to run emulator on CI might still be needed by some devs.

We should investigate the possibility and the cost of running such emulator, from our Docker image, ideally using sibling container (sharing host Docker socket).

@vincentbrison vincentbrison added enhancement New feature or request help wanted Extra attention is needed labels May 14, 2020
@vincentbrison vincentbrison added this to the v2.0.0 milestone May 14, 2020
@sjcqs
Copy link
Contributor

sjcqs commented May 20, 2020

Just spent 5 min doing Google searches 🙈

Google POC:

https://github.com/google/android-emulator-container-scripts

Keep in mind that you will see reduced performance if you are making use of nested virtualization.

Exposes a web site streaming emulators but might be a good resource

https://github.com/budtmo/docker-android

@AchrafAmil AchrafAmil self-assigned this Jul 28, 2020
@AchrafAmil
Copy link

Would some like to pair-program this together ?
I've been trying for few days with local docker (mac host) then with GCP KVMs and still struggling.

tried with @sjcqs suggestion : https://github.com/google/android-emulator-container-scripts
and https://github.com/thyrlian/AndroidSDK

@AchrafAmil
Copy link

AchrafAmil commented Jul 31, 2020

Finally succeeded creating, starting and adb-connecting to a docker-hosted emulator. 🎉
Still can pair-program if anyone is interested (especially the UI tests orchestration part).

@sjcqs
Copy link
Contributor

sjcqs commented Jul 31, 2020

@AchrafAmil I'm interested to PP with you to learn how you pull that off 😅

@sjcqs
Copy link
Contributor

sjcqs commented Aug 3, 2020

@AchrafAmil

Do you think the image you were able to build today could run as a service container ?

We should be able to communicate to the service container with ADB.

https://docs.github.com/en/actions/configuring-and-managing-workflows/about-service-containers

@AchrafAmil
Copy link

@AchrafAmil

Do you think the image you were able to build today could run as a service container ?

We should be able to communicate to the service container with ADB.

https://docs.github.com/en/actions/configuring-and-managing-workflows/about-service-containers

it's a docker container inside another docker container. The nested android-emulator docker-container runs in parallel thanks to docker compose and exposes a tcp port to bridge with ADB.

So we can indeed communicate with the nested docker container throw ADB.

@vincentbrison
Copy link
Contributor Author

Google will provide Android images for Docker 👌 https://github.com/google/android-emulator-container-scripts

@faberNovel faberNovel deleted a comment from AchrafAmil Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants