* Added VanillaIceCream (API 35)
* CommandLine Tools 12.0 → 13.0
This commit is contained in:
Álvaro Salcedo García 2024-04-26 16:52:11 +02:00
parent d1e96c7107
commit e91f27130f
No known key found for this signature in database
GPG Key ID: D44A4A5D292DE51A
3 changed files with 66 additions and 51 deletions

View File

@ -29,13 +29,12 @@ jobs:
name: Build Alpine Android Base Image
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
jdk: [8, 11, 17, 21]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set environment variables
shell: sh
@ -50,15 +49,15 @@ jobs:
CMDLINE_VERSION="10.0"
SDK_TOOLS_VERSION="9862592" ;;
*)
CMDLINE_VERSION="12.0"
SDK_TOOLS_VERSION="11076708" ;;
CMDLINE_VERSION="13.0"
SDK_TOOLS_VERSION="11479570" ;;
esac
echo "CMDLINE_VERSION=${CMDLINE_VERSION}" >> $GITHUB_ENV
echo "SDK_TOOLS_VERSION=${SDK_TOOLS_VERSION}" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ env.DH_IMAGE_BASE_NAME }}
@ -70,30 +69,30 @@ jobs:
type=raw,value=latest,enable=${{ matrix.jdk == env.DEFAULT_JDK_VERSION }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PASS }}
- name: Login to Quay
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ env.QUAY_USER }}
password: ${{ secrets.QUAY_PASS }}
- name: Build Android Base JDK${{ matrix.jdk }}
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./docker
file: ./docker/base.Dockerfile
@ -110,14 +109,13 @@ jobs:
needs: [build_base_images]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
android-api: [28, 29, 30, 31, 32, 33, 34]
android-api: [28, 29, 30, 31, 32, 33, 34, VanillaIceCream]
jdk: [8, 11, 17, 21]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set environment variables
shell: sh
@ -132,12 +130,13 @@ jobs:
32) BUILD_TOOLS_VERSION="32.0.0" ;;
33) BUILD_TOOLS_VERSION="33.0.2" ;;
34) BUILD_TOOLS_VERSION="34.0.0" ;;
VanillaIceCream) BUILD_TOOLS_VERSION="35.0.0-rc3" ;;
esac
echo "BUILD_TOOLS_VERSION=$BUILD_TOOLS_VERSION" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ env.DH_IMAGE_NAME }}
@ -151,30 +150,30 @@ jobs:
type=raw,value=latest,enable=${{ matrix.android-api == env.LATEST_STABLE_API && matrix.jdk == env.DEFAULT_JDK_VERSION }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PASS }}
- name: Login to Quay
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ env.QUAY_USER }}
password: ${{ secrets.QUAY_PASS }}
- name: Build Android API ${{ matrix.android-api }} JDK${{ matrix.jdk }}
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./docker
file: ./docker/android.Dockerfile

View File

@ -49,16 +49,17 @@ There are three variants of the image, all based on `bellsoft/liberica-openjdk-a
## Tagging
| API level | JDK8 | JDK11 | JDK17 | JDK21 |
|-----------------------------|----------------------------------|------------------------------------------------------------|------------------------------------|------------------------------------|
| Base Image | `jdk8` `latest-jdk8` | `jdk11`, `latest`, `latest-jdk11` | `jdk17`, `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`, `latest-jdk11` | `android-34-jdk17`, `latest-jdk17` | `android-34-jdk21`, `latest-jdk21` |
| 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 (VanillaIceCream)| `android-VanillaIceCream-jdk8` | `android-VanillaIceCream`, `android-VanillaIceCream-jdk11` | `android-VanillaIceCream-jdk17` | `android-VanillaIceCream-jdk21` |
### Versioning
@ -85,7 +86,7 @@ A valid example would be `android-30-jdk11-v2021.01.01`. [Here](https://github.c
|---------------------------|---------|-------------------------------------|----------------------------|
| 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 | 34.0.5 | Android SDK Platform-Tools | platform-tools/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
## Extend from Alpine Android Base
@ -95,7 +96,7 @@ Use the [following configuration](https://github.com/alvr/alpine-android#use-as-
RUN sdkmanager <list-of-packages>
```
If you want to install an Alpine package [available](https://pkgs.alpinelinux.org/packages?branch=v3.18). To install an Android package, include the following line on your Dockerfile:
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 <list-of-packages>
@ -113,7 +114,7 @@ RUN apk add --no-cache <list-of-packages>
| 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 | 34.0.5 | Android SDK Platform-Tools | platform-tools/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-28 | 6 | Android SDK Platform 28 | platforms/android-28/ |
</details>
@ -127,7 +128,7 @@ RUN apk add --no-cache <list-of-packages>
| 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 | 34.0.5 | Android SDK Platform-Tools | platform-tools/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-29 | 5 | Android SDK Platform 29 | platforms/android-29/ |
</details>
@ -141,7 +142,7 @@ RUN apk add --no-cache <list-of-packages>
| 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 | 34.0.5 | Android SDK Platform-Tools | platform-tools/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-30 | 3 | Android SDK Platform 30 | platforms/android-30/ |
</details>
@ -155,7 +156,7 @@ RUN apk add --no-cache <list-of-packages>
| 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 | 34.0.5 | Android SDK Platform-Tools | platform-tools/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-31 | 1 | Android SDK Platform 31 | platforms/android-31/ |
</details>
@ -169,7 +170,7 @@ RUN apk add --no-cache <list-of-packages>
| 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 | 34.0.5 | Android SDK Platform-Tools | platform-tools/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-32 | 1 | Android SDK Platform 32 | platforms/android-32/ |
</details>
@ -183,7 +184,7 @@ RUN apk add --no-cache <list-of-packages>
| 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 | 34.0.5 | Android SDK Platform-Tools | platform-tools/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-33 | 2 | Android SDK Platform 33 | platforms/android-33/ |
</details>
@ -198,8 +199,23 @@ RUN apk add --no-cache <list-of-packages>
| 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 | 34.0.5 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-34 | 2 | Android SDK Platform 34 | platforms/android-34/ |
| platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools/ |
| platforms;android-34 | 3 | Android SDK Platform 34 | platforms/android-34/ |
</details>
<details>
<summary>See content of Android 15 (VanillaIceCream) image</summary>
![Docker Android 14 JDK8 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-VanillaIceCream-jdk8?label=jdk8%20image%20size) ![Docker Android 14 JDK11 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-VanillaIceCream-jdk11?label=jdk11%20image%20size) ![Docker Android 14 JDK17 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-VanillaIceCream-jdk17?label=jdk17%20image%20size) ![Docker Android 14 JDK21 Size](https://img.shields.io/docker/image-size/alvrme/alpine-android/android-VanillaIceCream-jdk21?label=jdk21%20image%20size)
| Path | Version | Description | Location |
|----------------------------------|------------|-------------------------------------|-----------------------------------|
| build-tools;35.0.0-rc3 | 35.0.0-rc3 | Android SDK Build-Tools | build-tools/35.0.0-rc3/ |
| 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-VanillaIceCream| 3 | Android SDK Platform VanillaIceCream| platforms/android-VanillaIceCream/|
</details>

View File

@ -10,18 +10,18 @@ ENV ANDROID_SDK_ROOT "/opt/sdk"
ENV ANDROID_HOME ${ANDROID_SDK_ROOT}
ENV PATH $PATH:${ANDROID_SDK_ROOT}/cmdline-tools/${CMDLINE_VERSION}/bin:${ANDROID_SDK_ROOT}/platform-tools:${ANDROID_SDK_ROOT}/extras/google/instantapps
RUN apk upgrade && \
apk add --no-cache bash curl git unzip wget coreutils openssh-client tar && \
rm -rf /tmp/* && \
rm -rf /var/cache/apk/* && \
wget -q https://dl.google.com/android/repository/commandlinetools-linux-${SDK_TOOLS_VERSION}_latest.zip -O /tmp/tools.zip && \
mkdir -p ${ANDROID_SDK_ROOT}/cmdline-tools && \
unzip -qq /tmp/tools.zip -d ${ANDROID_SDK_ROOT}/cmdline-tools && \
mv ${ANDROID_SDK_ROOT}/cmdline-tools/* ${ANDROID_SDK_ROOT}/cmdline-tools/${CMDLINE_VERSION} && \
rm -v /tmp/tools.zip && \
mkdir -p ~/.android/ && touch ~/.android/repositories.cfg && \
yes | sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --licenses && \
sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --install "platform-tools" "extras;google;instantapps"
RUN apk upgrade && \
apk add --no-cache bash curl git unzip wget coreutils openssh-client tar && \
rm -rf /tmp/* && \
rm -rf /var/cache/apk/* && \
mkdir -p ${ANDROID_SDK_ROOT} && \
busybox unzip <(wget -qO- https://dl.google.com/android/repository/commandlinetools-linux-${SDK_TOOLS_VERSION}_latest.zip) -qK -d ${ANDROID_SDK_ROOT}/cmdline-tools && \
mv ${ANDROID_SDK_ROOT}/cmdline-tools/* ${ANDROID_SDK_ROOT}/cmdline-tools/${CMDLINE_VERSION} && \
mkdir -p ~/.android/ && \
touch ~/.android/repositories.cfg && \
chmod +x ${ANDROID_SDK_ROOT}/cmdline-tools/${CMDLINE_VERSION}/bin/sdkmanager && \
yes | sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --licenses && \
sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --install "platform-tools" "extras;google;instantapps"
COPY ./extras /bin