A docker image build with Android build environment.
It includes the following components:
- Ubuntu 17.10
- Android SDK 24
- Android build tools 24.0.2
- extra-android-m2repository
- extra-google-m2repository
- TestNG
- Python 2, Python 3
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 borispenev/docker-android-hdt: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 borispenev/docker-android-hdt bash -c 'cd /project; ./gradlew build'
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: borispenev/docker-android-hdt:latest
pipelines:
default:
- step:
script:
- chmod +x gradlew
- ./gradlew assemble
If gradlew is marked as executable in your repository as recommended, remove the chmod
command.
If you want to build the docker image by yourself, you can use following command.
docker build -t android-build-box .
If you want to enhance this docker image for fix something, feel free to send pull request.