Drop-Out-Club / docker-android

Docker container used to run Android for Cycle. Fork of budtmo/docker-android
Other
1 stars 0 forks source link

Docker Android

Build Dependancies

Run Dependancies

Building

(Assumes you are running every command as a user in the docker group, or as root)

With docker-compose

docker-compose build

Without docker-compose

Install docker-compose

Running

With docker-compose

docker-compose up

But with the current docker-compose.yml this won't do much.

Without docker-compose

docker run --privileged -d -p 8200:8200 -e DEVICE="Nexus 5" -e ACCESS_KEY="<ssh public key>" -e SCREEN_WIDTH="<width in pixels>" -e SCREEN_HEIGHT="<height in pixels>" --runtime runc --name android-container cycle/docker-android-x86-8.1

Note that if you want persistant user data you'll need to mount folders to /root/.android and /root/android_emulator

Connecting to container over SSH

The recommended way to connect to this container (assuming you're not using one of the Cycle clients), is to use SSH to forward any ports you need.

For example, if you want to use scrcpy over adb with a HTTP audio stream, you could use the following command:

ssh root@$CONTAINER_IP -L 5037:localhost:5037 -R 27183:localhost:27183 -L 4000:localhost:4000 -p 8200