Docker image for Android developers. Includes SDK, NDK and apktool.
To build the Docker image, simply run:
make build
Alternatively, you can instead type:
docker build . -t android-dev
Once the image is built, you can log into the container by typing:
make run
Or the equivalent Docker command:
docker run -it android-dev
To build an Android app using this image, run the following command from the app's source directory:
docker run --rm -v "$PWD:/root/workspace" android-dev gradlew assembleDebug
If you want to keep the container around, you can do this:
# Start the container in the background and give it the name "my_container"
docker run --name my_container --rm -t -d -v "$PWD:/root/workspace" android-dev
# Run a command to build our Android app inside of my_container
docker exec my_container /bin/sh gradlew assembleDebug
# Do something else with my_container, for example copy the resulting APK file
This Docker image is available on Docker Hub using automated builds. To use the pre-built image:
docker pull omtinez/android-dev