Sign inSign up

javavirys/android

By javavirys

•Updated 7 months ago

For build android app

Image
0

2.5K

javavirys/android repository overview

ā šŸ›  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

ComponentVersion / Description
Base OSUbuntu Latest
Java Versions8 & 17 (17 set as default)
Android AVDmynexus (Google APIs, x86, API 29)
Included Toolsadb, 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⁠

šŸ‘‰ GITHUB⁠

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

docker build \
  --build-arg android_compile_sdk=36 \
  --build-arg android_build_tools=36.0.0 \
  --build-arg android_sdk_tools=14742923 \
  -t your-username/android:36 .

⁠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.

Tag summary

Content type

Image

Digest

sha256:bceda98e4…

Size

2.1 GB

Last updated

7 months ago

docker pull javavirys/android:36