Sign inSign up

orustecnologia/react-native-android-pipeline

By orustecnologia

Updated over 1 year ago

Docker image for React Native Android development with Node22, Java 17, AndroidSDK 34, and Fastlane.

Image
Integration & delivery
1

252

orustecnologia/react-native-android-pipeline repository overview

Overview of the React Native Android Build Image

Description

This Docker image has been designed to provide a complete environment for building and deploying React Native Android applications. It contains all the necessary tools and dependencies to compile, test, and publish React Native apps to the Google Play Store through Bitbucket Pipelines.

Base Image

The image is based on:

reactnativecommunity/react-native-android:latest

This is an official image maintained by the React Native community, which already includes most of the basic tools for Android development.

Key Components

Base System
  • Ubuntu 22.04
  • Build-essential for native package compilation
  • Language and timezone support
Development Environment
  • OpenJDK 17 - Java version required for recent Android development
  • Node.js 18.20 - JavaScript runtime environment
  • Yarn - Dependency manager for Node.js projects
Android SDK
  • Build Tools 34.0.0 - Compilation tools
  • Platform SDK 34 - Android APIs
  • NDK 25.1.8937393 - Native Development Kit
  • CMake 3.22.1 - Tool required for compiling native code
CI/CD Tools
  • Fastlane - Framework for build and deploy automation
  • Ruby/Bundle - Required for Fastlane execution
  • Git configured to operate in CI environments

Environment Variables

The image configures the following environment variables to facilitate development:

  • ANDROID_HOME=/opt/android
  • ANDROID_SDK_ROOT=/opt/android
  • ANDROID_NDK_HOME=/opt/android/ndk/25.1.8937393
  • JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
  • CMAKE_BIN_PATH=/opt/android/cmake/3.22.1/bin
  • PATH configured to include all necessary tools

Usage in Bitbucket Pipelines

The image is referenced in the bitbucket-pipelines.yml file as:

image: orustecnologia/react-native-android-pipeline:1.0.3

And is optimized for use with the following caches:

  • Node modules (~/.npm)
  • Yarn (~/.cache/yarn)
  • Gradle (~/.gradle/caches and ~/.gradle/wrapper)
  • Android SDK (/opt/android-sdk)

Available Commands

The image comes with all the tools needed to:

  • Compile Android bundles (./gradlew bundleProductionRelease)
  • Sign Android packages
  • Publish to Google Play via Fastlane (fastlane upload_bundle_internal)
  • Run JavaScript tests via Jest

Considerations

This image was specifically created to meet the build requirements of React Native Android applications, with a focus on optimization for CI/CD environments such as Bitbucket Pipelines. It combines community best practices with specific optimizations to ensure fast and reliable builds.

Tag summary

Content type

Image

Digest

sha256:00ddd228e

Size

1.4 GB

Last updated

over 1 year ago

docker pull orustecnologia/react-native-android-pipeline:1.0.3