Skip to content

Conhea/docker-android-build-box

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Android Build Box

Build Status

Introduction

A docker image that can be used to supply an Android build environment. This is based on the fabulous work by Ming Chen. So thanks goes to him for providing the base for this.

What's Inside

It includes the following components:

  • Ubuntu latest
  • Android SDK 22 25 26 27 28
  • Android build tools 25.0.1 25.0.2 25.0.3 26.0.0 26.0.1 26.0.2 27.0.0 27.0.1 27.0.2 27.0.3 28.0.0 28.0.1 28.0.2 28.0.3
  • Android Emulator
  • System images:
    • system-images;android-28;google_apis;x86
    • system-images;android-27;google_apis;x86
    • system-images;android-26;google_apis;x86
    • system-images;android-25;google_apis;x86_64
  • extra-android-m2repository
  • extra-google-google_play_services
  • extra-google-m2repository
  • ConstraintLayout 1.0.1 1.0.2

Docker Pull Command

The docker image is publicly available on Docker Hub based on the Dockerfile in this repo, so there is nothing hidden in the image. To pull the latest docker image:

docker pull bohsen/android-build-box:latest

Usage

Use image to build Android project

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 bohsen/android-build-box bash -c 'cd /project; ./gradlew build'

Use image for Bitbucket pipeline

If you have your Android proect hosted on Bitbucket and want to use a bitbucket pipeline to build your Android project, this docker image can do it for you. Here is an example of a pipeline defined in bitbucket-pipelines.yml

image: bohsen/android-build-box:latest

pipelines:
  default:
    - step:
        script:
          - chmod +x gradlew
          - ./gradlew assemble

Docker Build Image

If you want to build the docker image locally, you can use the following docker build command to build the image. The image itself is up to 6 GB (can change significantly on every build if sdk components change), so check your free disk space before building it.

docker build -t android-build-box .

Contribution

If you want to enhance this docker image or fix something, feel free to send a pull request.

References

About

An optimized docker image that supplies an Android build environment.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 100.0%