Skip to content

Latest commit

 

History

History
79 lines (44 loc) · 2.59 KB

README.md

File metadata and controls

79 lines (44 loc) · 2.59 KB

Docker Android Build Box

Build Status

docker icon

Introduction

A docker image build with Android build environment.

What's Inside

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

Docker Pull Command

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

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

Use image for Bitbucket pipeline

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

Docker Build Image

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 .

Contribution

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

References