A docker image build with Android build environment.
It includes the following components:
Ubuntu 18.04Alpine with OpenJDK- Android SDK
16 17 18 19 20 21 22 23 24 2526 27 28 29 - Android build tools:
17.0.018.1.119.1.020.0.021.1.2 22.0.123.0.1 23.0.2 23.0.324.0.0 24.0.1 24.0.2 24.0.325.0.0 25.0.1 25.0.2 25.0.326.0.0 26.0.1 26.0.2- 27.0.1 27.0.2 27.0.3
- 28.0.1 28.0.2 28.0.3
- 29.0.2
Android NDK r20- extra-android-m2repository
- extra-google-m2repository
- extra-google-google_play_services
- Google API add-ons
Android Emulator- Constraint Layout
TestNGPython 2, Python 3Node.js, npm, React NativeRuby, RubyGemsfastlaneKotlin 1.3Flutter 1.5.4
The docker image is publicly automated build on Docker Hub based on the Dockerfile in this repo, so there is no hidden stuff in it. To pull the latest docker image:
docker pull theglow666/android-build-box:release
Importannt: Use actual tag to sepecific a stable version instead of release
. Checkout Releases to see all the available tags.
You can use this docker image to build your Android project with a single docker command:
cd <android project directory> # change working directory to your project root directory.
docker run --rm -v `pwd`:/project theglow666/android-build-box bash -c 'cd /project; ./gradlew build'
Run docker image with interactive bash shell:
docker run -v `pwd`:/project -it theglow666/android-build-box bash
If you have an Android project in a Bitbucket repository and want to use its pipeline to build it, you can simply specify this docker image.
Here is an example of bitbucket-pipelines.yml
image: theglow666/android-build-box:tagname
pipelines:
default:
- step:
caches:
- gradle
- gradlewrapper
- androidavd
script:
- bash ./gradlew assemble
definitions:
caches:
gradlewrapper: ~/.gradle/wrapper
androidavd: $ANDROID_HOME/.android/avd
The caches are used to store downloaded dependencies from previous builds, to speed up the next builds.
If you want to build the docker image by yourself, you can use following command. The image itself is around 2 GB, check your free disk space before building it.
docker build -t android-build-box .
Check releases for tags
If you want to enhance this docker image or fix something, feel free to send pull request.