Coder Social home page Coder Social logo

android-sdk-docker's Introduction

Android SDK on Docker (for React Native)

This is a Docker image for building Android applications on CI services specifically for React Native. The Dockerfile has been adapted from https://github.com/MobileDevOps/android-sdk-image to be more flexible and provide the right JDK and SDK.

The initial version has been tested with:

Releases

  • franzos/android-sdk:latest - Latest version of the image
  • franzos/android-sdk:node16-jdk11-sdk28-v0.1 - First version of the image (v0.1)
    • Node v16.20.0
    • JDK 11.0.18 2023-01-17
    • Android SDK v28.0.3
    • tested with React Native v0.65

Do not use latest unless you know what you are doing.

Usage

(1) Install your project dependencies (npm install) before running the container

(2) For ease, add a docker-compose.yml to your RN project:

version: '3.6'

services:
  builder:
    image: franzos/android-sdk:node16-jdk11-sdk28-v0.1
    command: tail -f /dev/null
    volumes:
      - .:/usr/src/app

(3) Start the container and connect to it.

docker compose -up
docker exec -it rna-builder bash

If you prefer to run the container in the background, do docker compose -up -d.

Shortcuts

Build debug APK

docker exec -it rna-builder build-debug-apk

This will generate a debug APK at:

android/app/build/outputs/apk/debug/app-debug.apk

You can install it to your device with:

adb install app-debug.apk

TODO

  • Support newer Android SDK's
  • Support newer RN versions
  • Automate build process for signed APK's

Release

docker build -t rna-builder .
docker tag rna-builder franzos/android-sdk:node16-jdk11-sdk28-v0.1
docker push franzos/android-sdk:node16-jdk11-sdk28-v0.1

On Linux hosts without iptables:

docker build --network=host -t rna-builder .

android-sdk-docker's People

Contributors

franzos avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.