thyrlian/AndroidSDK Docker Image for Android CI
🐳 Full-fledged Android SDK Docker Image
At a glance
- What is it?
- thyrlian/AndroidSDK packages a minimal Android SDK environment in Docker for repeatable builds and isolated tool installations. It is best suited to teams that want to control SDK components separately, but its external volume and architecture requirements add operational constraints.
- Who is it for?
- Adopt thyrlian/AndroidSDK when repeatable Android CI environments and isolated SDK tooling matter more than a preassembled, platform-specific image. Do not adopt it if you need a turnkey image with every required SDK package already installed or cannot manage a persistent SDK volume.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly Dockerfile, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Why thyrlian/AndroidSDK Packages Only the Minimal SDK
thyrlian/AndroidSDK addresses a common Android build inconsistency: a project may work on one workstation or CI runner but fail on another because the installed SDK packages, build tools, or supporting utilities differ. Its goal is to place the Android SDK environment inside a container so that the build environment can be reproduced without copying the developer's entire machine.
The project makes a deliberate choice here. It starts with the latest official minimal SDK package rather than baking every tool into one large image. That gives the user control over adding packages for a specific API level, build-tools release, emulator setup, or auxiliary application. It also avoids maintaining a separate Docker image for every Android API level. The README describes this as a barebone SDK, and that boundary is central to evaluating the project.
This design targets Android developers, CI engineers, and teams running tools such as Infer whose native dependencies may conflict with a local system. It is not presented as a complete Android Studio replacement. The image supplies an SDK development environment, while Gradle and the Kotlin compiler are included for convenience and trial use. A production adoption still needs project-specific package installation and version control.
Container Layout and Build Data Flow
The repository is organized around a Dockerfile-defined image, an `android-sdk/` directory, and a `gradle-server/` area. That layout is consistent with the stated model: the image provides the base Android SDK environment, while the containerized build process uses project sources and build tools through Gradle. The README does not describe a separate service or distributed build protocol, so `gradle-server/` should not be interpreted as a documented multi-node Gradle cluster.
For a normal Gradle build, the project controls Gradle through its wrapper. The README points to `<your_project>/gradle/wrapper/gradle-wrapper.properties` as the location that specifies the Gradle version. When the required distribution is not available, Gradle downloads and unpacks it under `~/.gradle/wrapper/dists/`. Subsequent invocations reuse that local distribution as long as its URL remains unchanged.
Kotlin is tied to the project's Gradle configuration. The README identifies `classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"` in `<your_project>/build.gradle` as the declaration that causes the matching Kotlin compiler dependency to be resolved while a Gradle task executes. Consequently, including Kotlin in the image does not replace project-level version management. Projects still need a compatible Gradle wrapper and explicit Kotlin plugin configuration.
Obtaining the Image and Running a First Gradle Build
The README directs users to Docker Hub for the published `thyrlian/android-sdk` image. Likewise, it does not provide a complete getting-started sequence showing the expected mounts and build command. Users must consult the Docker Hub image documentation or the repository's getting-started section before assuming a working invocation.
The first useful build should still follow the version controls documented by the README. Check `<your_project>/gradle/wrapper/gradle-wrapper.properties`, retain the committed Gradle wrapper, and run a task through that wrapper after starting a container with the project and SDK storage made available. The wrapper should place its downloaded distribution under `~/.gradle/wrapper/dists/`.
The README gives this task form as the example of a Gradle operation:
gradle <some_task>Do not substitute a host Gradle installation merely because Gradle is available inside the image. The README explicitly prefers the wrapper for a precise Gradle version and standardized execution. It also notes that the bundled Kotlin compiler is present for convenience, while the project-defined Kotlin plugin version is what the build resolves.
Persistent SDK Volumes and AUFS Failure Cases
The most important operational mechanism is the external, persistent SDK directory. The README says this directory can be mounted into any container, avoiding repeated downloads and retaining only packages selected for the project. It also presents the volume as protection against a failed SDK update that removes command-line tools.
The documented failure is concrete. After an unsuccessful update, `$ANDROID_HOME/cmdline-tools/tools/` can be empty. Commands such as `android` and `sdkmanager` then become unavailable, with `sdkmanager` pointing to a missing file under `/opt/android-sdk/cmdline-tools/tools/bin/`. Because some Android SDK tools are updated in place, preserving an external SDK directory gives the user a separate place to perform and retain updates.
The older caveat concerns Docker's AUFS storage driver and hard-link move operations used during SDK updates. The README says current Docker Engine versions no longer require changing the driver. It also states that AUFS was deprecated and later removed in the cited Docker for Mac releases. The present-day problem is not that every user must alter Docker. The remaining risk is that an in-container update can leave SDK state inconsistent, so mounting the SDK directory externally remains relevant.
Architecture Mismatches Can Break Android Binaries
The image can be updated from inside a container, but the README also discusses updating from a mounted host directory. That second option has a strict boundary: the host must use the same target architecture as the container, described in the documentation as `x86_64 Linux`. If packages are installed on a host with a mismatched target architecture, binaries in the shared SDK may no longer execute inside the container.
The documented symptoms include `aapt: cannot execute binary file: Exec format error` and `adb: cannot execute binary file: Exec format error`. A Gradle task may also fail with an `AAPT process not ready to receive commands` error. These failures are especially misleading because the SDK directory can appear populated while individual tools are unusable.
This is a real reason not to treat the SDK volume as an untyped cache shared across machines. Architecture-specific tools need an installation target that matches the consumer of the volume. The repository does not document multi-architecture image tags, platform selection, or a locking policy for shared volume updates. Those omissions matter for fleet design, where concurrent builds can otherwise treat mutable SDK content as if it were an ordinary artifact cache.
License Boundaries and Maintenance Signals
The repository uses the `Apache-2.0` license. That identifies the license stated for the project repository, but the README raises a separate distribution issue: the image intentionally starts with the minimal SDK and leaves package composition to the user. It links to Android's terms and conditions and states that the SDK or any part of it may not be redistributed. This is not a legal conclusion. It means users must distinguish permission to use the repository's licensed code from permission to redistribute Android SDK components in a derived image.
There are no GitHub releases to provide a versioned upgrade stream for this project. The repository's last push was on 2026-09-01. The Dockerfile and accompanying files can therefore change without a corresponding GitHub release entry. Consumers who need reproducible environments should record the exact image identity they use rather than assuming that a Docker Hub tag is immutable, although the README excerpt does not state a specific immutable tag convention.
Upgrade cost depends on local image composition. Projects that add SDK packages through a persistent volume may carry state forward between container upgrades, while projects that install packages during image construction must update that build definition.
Editorial conclusion
Adopt thyrlian/AndroidSDK when repeatable Android CI environments and isolated SDK tooling matter more than a preassembled, platform-specific image. Do not adopt it if you need a turnkey image with every required SDK package already installed or cannot manage a persistent SDK volume. Verify first that the external volume uses the same target architecture as the container, then confirm that your required build-tools, emulator, Gradle, and Kotlin versions can be installed through the image.
Frequently asked questions
What does thyrlian/AndroidSDK include by default?
It starts with the latest official minimal Android SDK package. Gradle and the Kotlin compiler are also included for convenience, while project-specific SDK tools remain something the user adds and manages.
Why should I use a persistent SDK directory with thyrlian/AndroidSDK?
The README says an external directory avoids repeated SDK downloads and allows the same SDK state to be mounted into containers. It also helps protect the environment from an unsuccessful in-container SDK update.
Can I update the thyrlian/AndroidSDK volume on the host?
Yes, but the README requires the host to have the same target architecture as the container, described as `x86_64 Linux`. A mismatch can leave tools such as `aapt` and `adb` unable to execute inside the container.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/thyrlian-androidsdk)