https://hub.docker.com/r/inovexgmbh/gitlab-ci-android/
Contains the Android SDK, NDK and common packages necessary for building Android Apps in Gitlab CI (for example). Make sure caching is enabled for the CI environment to speed up builds.
Example yml which has dependency caching enabled:
image: inovexgmbh/gitlab-ci-android
stages:
- release
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
build:
stage: release
script:
- ./gradlew clean assembleRelease
artifacts:
expire_in: 2 weeks
paths:
- app/build/outputs/apk/**/*.apk
rules:
- if: $CI_COMMIT_BRANCH == "develop"
The Docker image supports JDK 17, 21, 25 and 26. The default JAVA_HOME and the java/javac on PATH are JDK 25.
To use the correct version within your builds, it is recommended to define JAVA_HOME accordingly.
before_script:
- export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
# or java-17-openjdk-amd64, java-25-openjdk-amd64, java-26-openjdk-amd64
The NDK version listed in pkg.txt is installed via sdkmanager into /sdk/ndk/<version>, where the Android Gradle Plugin finds it through ndkVersion.
See CHANGELOG.md, including breaking changes.
The image targets linux/amd64 only (the Android SDK build-tools and NDK for Linux ship x86_64 binaries).
On Apple Silicon Macs, pass the platform explicitly, otherwise the build fails with JAVA_HOME is set to an invalid directory:
docker build --platform linux/amd64 -t gitlab-ci-android .
Releases are numbered Docker tags (1, 2, ...) plus latest.
- Move the
## Unreleasedentries in CHANGELOG.md under## <tag> - <date>and merge tomain. - Build and push from an up-to-date
main:
git checkout main && git pull
docker login
docker buildx build --platform linux/amd64 \
-t inovexgmbh/gitlab-ci-android:<tag> \
-t inovexgmbh/gitlab-ci-android:latest \
--push .
Gitlab CI Android
Copyright (c) 2026 inovex GmbH (https://www.inovex.de)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.