Skip to content

udfvirus/Android-CI-CD-Builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›  Android-CI-CD-Builder

This repository contains a Docker configuration designed to automate the build (CI) and delivery (CD) processes for Android applications. It provides a complete environment, from the SDK to a pre-configured emulator.

Official Website: udfsoft.com


✨ Key Features

  • Multi-JDK Support: Pre-installed OpenJDK 8 and OpenJDK 17 to support both legacy and modern Gradle versions.
  • Ready-to-use SDK: Automated installation of Android SDK, Build Tools, and Platform Tools via build arguments.
  • Built-in Emulator: Pre-configured Nexus 5 (API 29) system image for running instrumentation tests.
  • CI/CD Ready: Includes a GitHub Action to automatically build and push the image to Docker Hub.

πŸ— Image Composition

Component Version / Description
Base OS Ubuntu Latest
Java Versions 8 & 17 (17 set as default)
Android AVD mynexus (Google APIs, x86, API 29)
Included Tools adb, fastboot, curl, wget, unzip

πŸš€ Quick Start

Pull from Docker Hub You can quickly pull the latest ready-to-use image:

docker pull javavirys/android:36

πŸ‘‰ Docker Hub Repository: javavirys/android

Local Build To build the image manually with your specific parameters, use the _--build-arg _ flag:

docker build \
  --build-arg android_compile_sdk=33 \
  --build-arg android_build_tools=30.0.3 \
  --build-arg android_sdk_tools=4333796 \
  -t your-username/android:33 .

CI/CD Integration

To enable automatic image deployment on every push, configure the following Secrets in your GitHub repository settings:

  • DOCKER_USERNAME β€” Your Docker Hub username.
  • DOCKER_PASSWORD β€” Your Docker Hub Access Token (recommended) or password.

βš™οΈ GitHub Action Workflow

The automation process is defined in .github/workflows/main.yml:

  1. Checkout: Clones the repository code.
  2. Publish: Builds the Docker image by passing SDK versions as buildargs and pushes the result to the Registry.

πŸ’‘ Optimization Tips (Pro-tips)

[!IMPORTANT]The PATH Issue: In your current Dockerfile, the RUN export PATH=... command only applies within that specific layer. To ensure adb and emulator are accessible in any container instance, use the ENV instruction instead. Recommended fix for your Dockerfile:

ENV PATH=$ANDROID_SDK/emulator:$ANDROID_SDK/tools:$ANDROID_SDK/tools/bin:$ANDROID_SDK/platform-tools:$PATH

πŸ“„ License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors