A couple weeks ago, I was setting up a CI system with instrumented tests to run on Android devices. I have a spare computer at home that I use for these types of things, and wanted to run the github runner in a docker container.
There is a great existing container which handles this quite well: [https://github.com/myoung34/docker-github-actions-runner](https://github.com/myoung34/docker-github-actions-runner), however this container is only focused on the github runner and nothing more. So when your start your workflow for android, you need to use actions to install java and the android sdk.
There is also a great github action to do this: [https://github.com/android-actions/setup-android](https://github.com/android-actions/setup-android). The problem is you have a repo, or org which does not allow third party github actions. One way to get around this is to simply fork the existing action into the organization, but this may entail some maintenance overhead. Additionally, it would be nice to not have to install java and android every time to run an action.
![file](/uploads/image-1660770623496.png)
So I decided to create a container based on the github actions runner container, and then add java and android to that directly:
- [https://github.com/compscidr/docker-github-actions-runner-android](https://github.com/compscidr/docker-github-actions-runner-android)
- [https://hub.docker.com/repository/docker/compscidr/github-runner-android](https://hub.docker.com/repository/docker/compscidr/github-runner-android)