### Install Fastlane using extras command Source: https://github.com/alvr/alpine-android/blob/master/README.md Use the `extras` command to install fastlane. The first variant installs the latest version, while the second allows specifying a version. ```bash extras fastlane ``` ```bash extras fastlane ``` -------------------------------- ### Install NDK and CMake using extras command Source: https://github.com/alvr/alpine-android/blob/master/README.md Use the `extras` command to install NDK and CMake. The first variant installs the latest versions. The second variant allows specifying versions for NDK and/or CMake. ```bash extras ndk ``` ```bash extras ndk [--ndk | -n ] [--cmake | -c ] ``` -------------------------------- ### List Installable SDK Packages Source: https://context7.com/alvr/alpine-android/llms.txt Lists all available Android SDK packages that can be installed using sdkmanager. ```bash docker run --rm alvrme/alpine-android-base:jdk17 sdkmanager --list ``` -------------------------------- ### Install Fastlane using extras script Source: https://context7.com/alvr/alpine-android/llms.txt Use the bundled `extras` script to install Fastlane within a running container or during a Dockerfile build. Supports installing the latest release or a specific version. ```bash # Install the latest Fastlane release extras fastlane # Install a pinned Fastlane version extras fastlane 2.220.0 ``` -------------------------------- ### Install Android Packages with sdkmanager Source: https://github.com/alvr/alpine-android/blob/master/README.md Use this command to install Android SDK packages. Replace `` with the desired package names. ```dockerfile RUN sdkmanager ``` -------------------------------- ### Typical Dockerfile Usage Source: https://context7.com/alvr/alpine-android/llms.txt A basic Dockerfile setup using the Alpine Android image to build an Android project with Fastlane. ```docker FROM alvrme/alpine-android:android-34-jdk17 RUN extras fastlane 2.220.0 COPY . /home/android/project WORKDIR /home/android/project CMD ["fastlane", "beta"] ``` -------------------------------- ### Dockerfile with SDK Packages Source: https://context7.com/alvr/alpine-android/llms.txt Installs specified build tools, platforms, and repositories using sdkmanager in a Dockerfile. ```docker FROM alvrme/alpine-android-base:jdk17 RUN sdkmanager \ "build-tools;34.0.0" \ "platforms;android-34" \ "extras;google;m2repository" \ "ndk;28.0.12433566" ``` -------------------------------- ### Install SDK Packages via sdkmanager Source: https://context7.com/alvr/alpine-android/llms.txt Installs specific Android SDK packages directly from the command line using sdkmanager. ```bash docker run --rm alvrme/alpine-android-base:jdk17 \ sdkmanager "extras;android;m2repository" "extras;google;m2repository" ``` -------------------------------- ### Install Android NDK and CMake Source: https://context7.com/alvr/alpine-android/llms.txt Install the Android NDK and CMake toolchain. Defaults to NDK 29.0.14206865 and CMake 4.1.2. Specific versions can be installed using --ndk and --cmake flags. ```bash extras ndk ``` ```bash extras ndk --ndk 28.0.12433566 ``` ```bash extras ndk -n 28.0.12433566 ``` ```bash extras ndk --cmake 3.22.1 ``` ```bash extras ndk -c 3.22.1 ``` ```bash extras ndk --ndk 28.0.12433566 --cmake 3.22.1 ``` -------------------------------- ### Install Alpine Packages with apk Source: https://github.com/alvr/alpine-android/blob/master/README.md Use this command to install Alpine Linux packages. Replace `` with the desired package names. The `--no-cache` flag ensures that the package index is not stored, reducing image size. ```dockerfile RUN apk add --no-cache ``` -------------------------------- ### Verify JDK Version in Image Source: https://context7.com/alvr/alpine-android/llms.txt Check the installed JDK version within a specific Alpine Android image tag. This is useful for ensuring compatibility with your project's requirements. ```bash # Verify the JDK inside a pulled image docker run --rm alvrme/alpine-android:android-34-jdk17 java -version # openjdk version "17.0.x" ... docker run --rm alvrme/alpine-android:android-34-jdk8 java -version # openjdk version "1.8.0_xxx" ... ``` -------------------------------- ### Extend Alpine Android in Dockerfile Source: https://context7.com/alvr/alpine-android/llms.txt Use `alpine-android` or `alpine-android-base` as a base image in your Dockerfile to create custom CI environments. Install additional packages and SDK components as needed. ```dockerfile # Extend the full Android 14 / JDK 17 image FROM alvrme/alpine-android:android-34-jdk17 # Install additional Alpine packages RUN apk add --no-cache nodejs npm # Install extra Android SDK packages via sdkmanager RUN sdkmanager "extras;android;m2repository" "extras;google;m2repository" # Copy project and pre-download Gradle wrapper COPY gradlew gradlew.bat gradle/ ./ RUN chmod +x ./gradlew && ./gradlew --version ``` ```dockerfile # Extend the base image and manually add the desired Android platform FROM alvrme/alpine-android-base:jdk17 # Install any Android package listed at: # https://gist.github.com/alvr/8db356880447d2c4bbe948ea92d22c23 RUN sdkmanager "build-tools;34.0.0" "platforms;android-34" # Install Alpine package RUN apk add --no-cache python3 CMD ["./gradlew", "assembleDebug"] ``` -------------------------------- ### Run Alpine Android Container Interactively Source: https://context7.com/alvr/alpine-android/llms.txt Spin up a disposable container for an interactive Bash shell with the Android SDK tools on PATH. Mount local projects to build them directly within the container. ```bash # Ephemeral container — deleted when the shell exits docker run --rm -it alvrme/alpine-android:android-34-jdk17 # Keep the container after exiting (remove --rm) docker run -it alvrme/alpine-android:android-34-jdk17 # Mount a local Android project and build it docker run --rm -it \ -v "$PWD":/home/android/project \ -w /home/android/project \ alvrme/alpine-android:android-34-jdk17 \ ./gradlew assembleRelease # Expected: Gradle build output ending with BUILD SUCCESSFUL ``` -------------------------------- ### Run Container from Quay Source: https://github.com/alvr/alpine-android/blob/master/README.md Run a container from the specified Quay image. The container will be removed after exit unless `--rm` is omitted. It opens in `/home/android` with tools in the PATH. ```bash docker run --rm -it quay.io/alvr/alpine-android-base: ``` ```bash docker run --rm -it quay.io/alvr/alpine-android: ``` -------------------------------- ### Run Container from GHCR Source: https://github.com/alvr/alpine-android/blob/master/README.md Run a container from the specified GitHub Container Registry image. The container will be removed after exit unless `--rm` is omitted. It opens in `/home/android` with tools in the PATH. ```bash docker run --rm -it ghcr.io/alvr/alpine-android-base: ``` ```bash docker run --rm -it ghcr.io/alvr/alpine-android: ``` -------------------------------- ### Run Container from DockerHub Source: https://github.com/alvr/alpine-android/blob/master/README.md Run a container from the specified DockerHub image. The container will be removed after exit unless `--rm` is omitted. It opens in `/home/android` with tools in the PATH. ```bash docker run --rm -it alvrme/alpine-android-base: ``` ```bash docker run --rm -it alvrme/alpine-android: ``` -------------------------------- ### Use Docker Image as Base Image (Quay) Source: https://github.com/alvr/alpine-android/blob/master/README.md Specify the ALVR Alpine Android base or Android image from Quay in your Dockerfile. Replace `` with the desired image tag. ```Dockerfile FROM quay.io/alvr/alpine-android-base: ``` ```Dockerfile FROM quay.io/alvr/alpine-android: ``` -------------------------------- ### Use Docker Image as Base Image (DockerHub) Source: https://github.com/alvr/alpine-android/blob/master/README.md Specify the ALVR Alpine Android base or Android image from DockerHub in your Dockerfile. Replace `` with the desired image tag. ```Dockerfile FROM alvrme/alpine-android-base: ``` ```Dockerfile FROM alvrme/alpine-android: ``` -------------------------------- ### GitHub Actions CI Workflow Source: https://context7.com/alvr/alpine-android/llms.txt A GitHub Actions workflow configuration that uses an Alpine Android image as the build container and includes caching for Gradle dependencies. ```yaml name: Android CI on: push: branches: [main] pull_request: jobs: build: runs-on: ubuntu-latest container: image: alvrme/alpine-android:android-34-jdk17 steps: - name: Checkout uses: actions/checkout@v4 - name: Cache Gradle uses: actions/cache@v4 with: path: | ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - name: Build debug APK run: ./gradlew assembleDebug --stacktrace - name: Run unit tests run: ./gradlew test - name: Upload APK uses: actions/upload-artifact@v4 with: name: debug-apk path: app/build/outputs/apk/debug/*.apk ``` -------------------------------- ### Use Docker Image as Base Image (GHCR) Source: https://github.com/alvr/alpine-android/blob/master/README.md Specify the ALVR Alpine Android base or Android image from GitHub Container Registry in your Dockerfile. Replace `` with the desired image tag. ```Dockerfile FROM ghcr.io/alvr/alpine-android-base: ``` ```Dockerfile FROM ghcr.io/alvr/alpine-android: ``` -------------------------------- ### Pull Docker Image from DockerHub Source: https://github.com/alvr/alpine-android/blob/master/README.md Use this command to pull the base or Android image from DockerHub. Replace `` with the desired image tag. ```bash docker pull alvrme/alpine-android-base: ``` ```bash docker pull alvrme/alpine-android: ``` -------------------------------- ### Pull Docker Image from Quay Source: https://github.com/alvr/alpine-android/blob/master/README.md Use this command to pull the base or Android image from Quay. Replace `` with the desired image tag. ```bash docker pull quay.io/alvr/alpine-android-base: ``` ```bash docker pull quay.io/alvr/alpine-android: ``` -------------------------------- ### Dockerfile with NDK Support Source: https://context7.com/alvr/alpine-android/llms.txt Adds NDK and CMake support to a base Alpine Android image within a Dockerfile. ```docker FROM alvrme/alpine-android:android-34-jdk17 RUN extras ndk --ndk 28.0.12433566 --cmake 3.22.1 COPY . /home/android/project WORKDIR /home/android/project CMD ["./gradlew", "assembleRelease"] ``` -------------------------------- ### Dockerfile with Dated Version Pinning Source: https://context7.com/alvr/alpine-android/llms.txt Uses a dated tag in a Dockerfile for fully reproducible builds, ensuring the exact image snapshot is used. ```docker FROM alvrme/alpine-android:android-34-jdk17-v2024.06.01 COPY . /home/android/project WORKDIR /home/android/project RUN ./gradlew assembleRelease ``` -------------------------------- ### Pull Docker Image from GHCR Source: https://github.com/alvr/alpine-android/blob/master/README.md Use this command to pull the base or Android image from GitHub Container Registry. Replace `` with the desired image tag. ```bash docker pull ghcr.io/alvr/alpine-android-base: ``` ```bash docker pull ghcr.io/alvr/alpine-android: ``` -------------------------------- ### Pull Dated Version Image Source: https://context7.com/alvr/alpine-android/llms.txt Pulls a specific image snapshot from a known release date to ensure build reproducibility. ```bash docker pull alvrme/alpine-android:android-34-jdk17-v2024.06.01 ``` -------------------------------- ### Pull Alpine Android Docker Images Source: https://context7.com/alvr/alpine-android/llms.txt Pull pre-built images from DockerHub, GitHub Container Registry, or Quay. Tags specify Android API level and JDK version. Supports specific dated releases for reproducibility. ```bash # DockerHub — latest stable (Android 16 / API 36, JDK 17) docker pull alvrme/alpine-android:latest # DockerHub — specific API level + JDK docker pull alvrme/alpine-android:android-34-jdk17 # DockerHub — base image only (no build-tools / platforms) docker pull alvrme/alpine-android-base:jdk17 # GitHub Container Registry equivalents docker pull ghcr.io/alvr/alpine-android:android-34-jdk17 docker pull ghcr.io/alvr/alpine-android-base:jdk17 # Quay equivalents docker pull quay.io/alvr/alpine-android:android-34-jdk17 docker pull quay.io/alvr/alpine-android-base:jdk17 # Pin to a specific dated release (format: android-XX-jdkZZ-vYYYY.MM.DD) docker pull alvrme/alpine-android:android-34-jdk17-v2024.06.01 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.