A docker image build with Android build environment.
It include following components:
- Ubuntu 17.10
- Android SDK 26
- Android build tools 27.0.3
- extra-android-m2repository
- extra-google-google_play_services
- extra-google-m2repository
- Fastlane
The docker image is publicly automated build on Docker Hub based on Dockerfile in this repo, so there is no hidden staff in image. To pull the latest docker image:
docker pull mathroule/docker-android-build-box:latest
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 mathroule/docker-android-build-box bash -c 'cd /project; ./gradlew build'
If you have Android code in Bitbucket and want to use it pipeline to build your Android code, you can simply specific this docker image.
Here is an example of bitbucket-pipelines.yml
image: mathroule/docker-android-build-box:latest
pipelines:
default:
- step:
script:
- chmod +x gradlew
- ./gradlew assemble
If you want to build docker image by yourself, you can use following docker build
command to build your image.
The image itself up to 5.5 GB, check your free disk space before build it.
docker build -t docker-android-build-box .
If you want to enhance this docker image for fix something, feel free to send pull request.