Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alvr/alpine-android

🐋 Small docker image for building & testing Android applications.
https://github.com/alvr/alpine-android

alpine alpine-android android android-image docker-alpine docker-alpine-android docker-android docker-image

Last synced: about 1 month ago
JSON representation

🐋 Small docker image for building & testing Android applications.

Awesome Lists containing this project

README

        

# Alpine Android Docker Images


Alpine Android


GitHub build status
Latest release
Notify new versions


Docker Alpine Android Base Pulls
Docker Alpine Android Main Pulls


DockerHub Link
GitHub Container Registry Link
Quay Link


DockerHub Link
GitHub Container Registry Link
Quay Link

---

## Variants

There are three variants of the image, all based on `bellsoft/liberica-openjdk-alpine`:

* JDK8 images are based on Liberica JDK 8u422-6 and uses the tag's suffix `-jdk8`.
* JDK11 images are based on Liberica JDK 11.0.24-9 and uses the tag's suffix `-jdk11`.
* JDK17 images are based on Liberica JDK 17.0.12-10 and uses the tag's suffix `-jdk17`.
* JDK21 images are based on Liberica JDK 21.0.4+9 and uses the tag's suffix `-jdk21`.

### Which one should I use?

| JDK version | AGP version |
|-------------|---------------------|
| 8 | < 7.0.0 |
| 11 | >= 7.0.0 && < 8.0.0 |
| 17 | >= 8.0.0 |
| 21 | >= 8.2.1 |

## Tagging

| API level | JDK8 | JDK11 | JDK17 | JDK21 |
|------------------|----------------------------------|--------------------------------------------------|----------------------------------------------|------------------------------------|
| Base Image | `jdk8` `latest-jdk8` | `jdk11`, `latest-jdk11` | `jdk17`, `latest`, `latest-jdk17` | `jdk21`, `latest-jdk21` |
| Android 9.0 (28) | `android-28-jdk8` | `android-28`, `android-28-jdk11` | `android-28-jdk17` | `android-28-jdk21` |
| Android 10 (29) | `android-29-jdk8` | `android-29`, `android-29-jdk11` | `android-29-jdk17` | `android-29-jdk21` |
| Android 11 (30) | `android-30-jdk8` | `android-30`, `android-30-jdk11` | `android-30-jdk17` | `android-30-jdk21` |
| Android 12 (31) | `android-31-jdk8` | `android-31`, `android-31-jdk11` | `android-31-jdk17` | `android-31-jdk21` |
| Android 12L (32) | `android-32-jdk8` | `android-32`, `android-32-jdk11` | `android-32-jdk17` | `android-32-jdk21` |
| Android 13 (33) | `android-33-jdk8` | `android-33`, `android-33-jdk11` | `android-33-jdk17` | `android-33-jdk21` |
| Android 14 (34) | `android-34-jdk8`, `latest-jdk8` | `android-34`, `android-34-jdk11`, `latest-jdk11` | `android-34-jdk17`, `latest`, `latest-jdk17` | `android-34-jdk21`, `latest-jdk21` |
| Android 15 (35) | `android-35-jdk8` | `android-35`, `android-35-jdk11` | `android-35-jdk17` | `android-35-jdk21` |

### Versioning

Since January 1st 2021, new versions now include the date it was published so is possible to revert to a previous version. The versioning only applies to tags with the JDK version specified. The tag's format is: `android-XX-jdkZZ-vYYYY.MM.DD`, where:

* `XX` is the API level.
* `ZZ` is the version of the JDK.
* `YYYY` is the year of the release version.
* `MM` is the month of the year of the release version with leading zeros.
* `DD` is the day of the month of the release version with leading zeros.

A valid example would be `android-30-jdk11-v2021.01.01`. [Here](https://github.com/alvr/alpine-android/releases) are listed all the versions.

> :memo: Versioning is not available for `alpine-android-base`.

## Content

See content of Android Base image

![Docker Android Base JDK8 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android-base/jdk8?label=jdk8%20image%20size) ![Docker Android Base JDK11 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android-base/jdk11?label=jdk11%20image%20size) ![Docker Android Base JDK17 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android-base/jdk17?label=jdk17%20image%20size) ![Docker Android Base JDK21 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android-base/jdk21?label=jdk21%20image%20size)

| Path | Version | Description | Location |
|---------------------------|---------|-------------------------------------|----------------------------|
| extras;google;instantapps | 1.9.0 | Google Play Instant Development SDK | extras/google/instantapps/ |
| patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |

## Extend from Alpine Android Base

Use the [following configuration](https://github.com/alvr/alpine-android#use-as-base-image) in your Dockerfile. After that, you can install any Android package [available](https://gist.github.com/alvr/8db356880447d2c4bbe948ea92d22c23). To install an Android package, include the following line on your Dockerfile:

```dockerfile
RUN sdkmanager
```

If you want to install an Alpine package [available](https://pkgs.alpinelinux.org/packages?branch=v3.19). To install an Android package, include the following line on your Dockerfile:

```dockerfile
RUN apk add --no-cache
```

See content of Android 9 (Pie) image

![Docker Android 9 JDK8 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-28-jdk8?label=jdk8%20image%20size) ![Docker Android 9 JDK11 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-28-jdk11?label=jdk11%20image%20size) ![Docker Android 9 JDK17 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-28-jdk17?label=jdk17%20image%20size) ![Docker Android 9 JDK21 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-28-jdk21?label=jdk21%20image%20size)

| Path | Version | Description | Location |
|---------------------------|---------|-------------------------------------|----------------------------|
| build-tools;28.0.3 | 28.0.3 | Android SDK Build-Tools | build-tools/28.0.3/ |
| extras;google;instantapps | 1.9.0 | Google Play Instant Development SDK | extras/google/instantapps/ |
| patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-28 | 6 | Android SDK Platform 28 | platforms/android-28/ |

See content of Android 10 (Q) image

![Docker Android 10 JDK8 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-29-jdk8?label=jdk8%20image%20size) ![Docker Android 10 JDK11 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-29-jdk11?label=jdk11%20image%20size) ![Docker Android 10 JDK17 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-29-jdk17?label=jdk17%20image%20size) ![Docker Android 10 JDK21 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-29-jdk21?label=jdk21%20image%20size)

| Path | Version | Description | Location |
|---------------------------|---------|-------------------------------------|----------------------------|
| build-tools;29.0.3 | 29.0.3 | Android SDK Build-Tools | build-tools/29.0.3/ |
| extras;google;instantapps | 1.9.0 | Google Play Instant Development SDK | extras/google/instantapps/ |
| patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-29 | 5 | Android SDK Platform 29 | platforms/android-29/ |

See content of Android 11 (R) image

![Docker Android 11 JDK8 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-30-jdk8?label=jdk8%20image%20size) ![Docker Android 11 JDK11 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-30-jdk11?label=jdk11%20image%20size) ![Docker Android 11 JDK17 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-30-jdk17?label=jdk17%20image%20size) ![Docker Android 11 JDK21 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-30-jdk21?label=jdk21%20image%20size)

| Path | Version | Description | Location |
|---------------------------|---------|-------------------------------------|----------------------------|
| build-tools;30.0.3 | 30.0.3 | Android SDK Build-Tools | build-tools/30.0.3/ |
| extras;google;instantapps | 1.9.0 | Google Play Instant Development SDK | extras/google/instantapps/ |
| patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-30 | 3 | Android SDK Platform 30 | platforms/android-30/ |

See content of Android 12 (S) image

![Docker Android 12 JDK8 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-31-jdk8?label=jdk8%20image%20size) ![Docker Android 12 JDK11 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-31-jdk11?label=jdk11%20image%20size) ![Docker Android 12 JDK17 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-31-jdk17?label=jdk17%20image%20size) ![Docker Android 12 JDK21 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-31-jdk21?label=jdk21%20image%20size)

| Path | Version | Description | Location |
|---------------------------|---------|-------------------------------------|----------------------------|
| build-tools;31.0.0 | 31.0.0 | Android SDK Build-Tools | build-tools/31.0.0/ |
| extras;google;instantapps | 1.9.0 | Google Play Instant Development SDK | extras/google/instantapps/ |
| patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-31 | 1 | Android SDK Platform 31 | platforms/android-31/ |

See content of Android 12L image

![Docker Android 12L JDK8 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-32-jdk8?label=jdk8%20image%20size) ![Docker Android 12L JDK11 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-32-jdk11?label=jdk11%20image%20size) ![Docker Android 12L JDK17 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-32-jdk17?label=jdk17%20image%20size) ![Docker Android 12 JDK21 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-32-jdk21?label=jdk21%20image%20size)

| Path | Version | Description | Location |
|---------------------------|---------|-------------------------------------|----------------------------|
| build-tools;32.0.0 | 32.0.0 | Android SDK Build-Tools | build-tools/32.0.0/ |
| extras;google;instantapps | 1.9.0 | Google Play Instant Development SDK | extras/google/instantapps/ |
| patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-32 | 1 | Android SDK Platform 32 | platforms/android-32/ |

See content of Android 13 (Tiramisu) image

![Docker Android 13 JDK8 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-33-jdk8?label=jdk8%20image%20size) ![Docker Android 13 JDK11 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-33-jdk11?label=jdk11%20image%20size) ![Docker Android 13 JDK17 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-33-jdk17?label=jdk17%20image%20size) ![Docker Android 13 JDK21 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-33-jdk21?label=jdk21%20image%20size)

| Path | Version | Description | Location |
|---------------------------|---------|-------------------------------------|----------------------------|
| build-tools;33.0.2 | 33.0.2 | Android SDK Build-Tools | build-tools/33.0.2/ |
| extras;google;instantapps | 1.9.0 | Google Play Instant Development SDK | extras/google/instantapps/ |
| patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-33 | 2 | Android SDK Platform 33 | platforms/android-33/ |

See content of Android 14 (Upside-down Cake) image

![Docker Android 14 JDK8 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-34-jdk8?label=jdk8%20image%20size) ![Docker Android 14 JDK11 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-34-jdk11?label=jdk11%20image%20size) ![Docker Android 14 JDK17 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-34-jdk17?label=jdk17%20image%20size) ![Docker Android 14 JDK21 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-34-jdk21?label=jdk21%20image%20size)

| Path | Version | Description | Location |
|----------------------------------|------------|-------------------------------------|-----------------------------------|
| build-tools;34.0.0 | 34.0.0 | Android SDK Build-Tools | build-tools/34.0.0/ |
| extras;google;instantapps | 1.9.0 | Google Play Instant Development SDK | extras/google/instantapps/ |
| patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-34 | 3 | Android SDK Platform 34 | platforms/android-34/ |

See content of Android 15 (VanillaIceCream) image

![Docker Android 15 JDK8 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-35-jdk8?label=jdk8%20image%20size) ![Docker Android 15 JDK11 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-35-jdk11?label=jdk11%20image%20size) ![Docker Android 15 JDK17 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-35-jdk17?label=jdk17%20image%20size) ![Docker Android 15 JDK21 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-35-jdk21?label=jdk21%20image%20size)

| Path | Version | Description | Location |
|----------------------------------|------------|-------------------------------------|-----------------------------------|
| build-tools;35.0.0 | 35.0.0 | Android SDK Build-Tools | build-tools/35.0.0/ |
| extras;google;instantapps | 1.9.0 | Google Play Instant Development SDK | extras/google/instantapps/ |
| patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-35 | 1 | Android SDK Platform VanillaIceCream| platforms/android-35/ |

## Containers registries

Because of the [DockerHub rate limits](https://www.docker.com/increase-rate-limits), the image is now in three different containers registries:

* DockerHub: [Base Image](https://hub.docker.com/repository/docker/alvrme/alpine-android-base/tags) and [Android Image](https://hub.docker.com/repository/docker/alvrme/alpine-android/tags).
* GitHub Container Registry: [Base Image](https://github.com/users/alvr/packages/container/alpine-android-base/versions) and [Android Image](https://github.com/users/alvr/packages/container/alpine-android/versions).
* Quay: [Base Image](https://quay.io/repository/alvr/alpine-android-base?tab=tags) and [Android Image](https://quay.io/repository/alvr/alpine-android?tab=tags).

### Pulling from the different registries

Replace `` with one of the current [available tags](#tagging).

#### DockerHub pulling

You can pull a specific Docker image from DockerHub with the following command:

```bash
docker pull alvrme/alpine-android-base:
```

```bash
docker pull alvrme/alpine-android:
```

#### GHCR pulling

You can pull a specific Docker image from GitHub Container Registry with the following command:

```bash
docker pull ghcr.io/alvr/alpine-android-base:
```

```bash
docker pull ghcr.io/alvr/alpine-android:
```

#### Quay pulling

You can pull a specific Docker image from Quay with the following command:

```bash
docker pull quay.io/alvr/alpine-android-base:
```

```bash
docker pull quay.io/alvr/alpine-android:
```

### Use as Base Image

Replace `` with one of the current [available tags](#tagging).

#### DockerHub base image

You can use the Docker images from DockerHub as a base image for creating a new one:

```Dockerfile
FROM alvrme/alpine-android-base:
```

```Dockerfile
FROM alvrme/alpine-android:
```

#### GHCR base image

You can use the Docker images from GitHub Container Registry as a base image for creating a new one:

```Dockerfile
FROM ghcr.io/alvr/alpine-android-base:
```

```Dockerfile
FROM ghcr.io/alvr/alpine-android:
```

#### Quay base image

You can use the Docker images from Quay as a base image for creating a new one:

```Dockerfile
FROM quay.io/alvr/alpine-android-base:
```

```Dockerfile
FROM quay.io/alvr/alpine-android:
```

### Run container

Replace `` with one of the current [available tags](#tagging).

The command below will create a new container based on the specific image. It will open in the `/home/android` directory and the various [available commands](https://alvr.dev/en/projects/docker/alpine-android/#tools-included) in the `PATH` will be able to be executed. Once the container is closed, it will be deleted. To keep the container after closing it, you have to remove `--rm` from the command.

#### DockerHub run container

Run the container from the DockerHub image:

```bash
docker run --rm -it alvrme/alpine-android-base:
```

```bash
docker run --rm -it alvrme/alpine-android:
```

#### GHCR run container

Run the container from the GitHub Container Registry image:

```bash
docker run --rm -it ghcr.io/alvr/alpine-android-base:
```

```bash
docker run --rm -it ghcr.io/alvr/alpine-android:
```

#### Quay run container

Run the container from the Quay image:

```bash
docker run --rm -it quay.io/alvr/alpine-android-base:
```

```bash
docker run --rm -it quay.io/alvr/alpine-android:
```

## Extras

The base image also includes the `extras` command that contains small utilities that are not installed by default, since their use is not widespread.

These extras are executed with the command `extras ` and are the following

### Fastlane

[fastlane](https://github.com/fastlane/fastlane) is a tool for iOS and Android developers to automate tedious tasks like generating screenshots, dealing with provisioning profiles, and releasing your application. Visit their [documentation](https://docs.fastlane.tools/) for more information.

This command allows you to install `fastlane`. There are two variants:

```bash
extras fastlane
```

This command allows you to install the latest version of `fastlane`. If you want to use a specific version, the command is as follows:

```bash
extras fastlane
```

### NDK

The [Android NDK](https://developer.android.com/ndk) is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. For certain types of apps, this can help you reuse code libraries written in those languages.

This command allows you to install NDK and CMAKE using the latest versions available (NDK: `26.1.10909125`; CMAKE: `3.22.1`):

```bash
extras ndk
```

Is also possible to specify the version of NDK and CMAKE with:

```bash
extras ndk [--ndk | -n ] [--cmake | -c ]
```

It is not necessary to enter both versions, is possible to omit one.

## Extending from Alpine Android Base

[Read more here](https://alvr.dev/en/projects/docker/alpine-android/#alpine-android-base)

## Difference between Alpine Android and Alpine Android Base

The main difference between Alpine Android and Alpine Android Base is that the first one includes the corresponding `build-tools` and `platforms;android` versions. All Alpine Android versions share 95% of the code. Using a base image with the common part makes it easier to maintain.