Update Android docker images

Summary:
Quick update to switch to a new React Native CI org on Docker Hub. Note that the images are not yet automatically generated on CI. We could do this on Circle CI in certain scenarios:

- Base image needs to be updated whenever the Android development environment has changed (e.g. switch to a new SDK version, build tools, etc)
- Tests image should ideally be updated on each commit

This PR should be safe to land as Circle CI is not yet using these images.
Closes https://github.com/facebook/react-native/pull/19192

Differential Revision: D7939209

Pulled By: hramos

fbshipit-source-id: 0f845a8fffbf8f5b9cecef4fa0ba802bc755f7aa
This commit is contained in:
Héctor Ramos 2018-05-09 23:26:39 -07:00 committed by Facebook Github Bot
parent 9d0b7d8f31
commit 3bc2696d65
3 changed files with 27 additions and 4 deletions

View File

@ -1,4 +1,12 @@
FROM hramos/android-base:latest
# React Native Android Unit Tests
#
# This image builds upon the React Native Base Android Development Environment
# image. Ideally, this image would be rebuilt with any new commit to the master
# branch. Doing so will catch issues such as BUCK failing to fetch dependencies
# or run tests, as well as unit test failures.
FROM reactnativeci/android-base:latest
LABEL Description="This image prepares and runs React Native's Android tests." maintainer "Héctor Ramos <hector@fb.com>"
# set default environment variables
ENV GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs=\"-Xmx512m -XX:+HeapDumpOnOutOfMemoryError\""

View File

@ -1,5 +1,20 @@
# React Native Base Android Development Environment
#
# This image provides a base Android development environment for React Native,
# including, but not limited to, the Android SDK, Android NDK, Node, and BUCK.
# These are required in order to run React Native's Android unit and integration
# tests.
#
# This image is not currently built automatically as part of React Native's CI
# infrastructure. It should not be necessary to rebuild this image while the
# Android dependencies (Android SDK version, build tools version, etc) remain
# equal. The operations performed to build this image are those that tend to
# remain stable across commits in any given React Native release.
FROM library/ubuntu:16.04
LABEL Description="This image provides a base Android development environment for React Native, and may be used to run tests." maintainer "Héctor Ramos <hector@fb.com>"
# set default build arguments
ARG ANDROID_TOOLS_VERSION=25.2.5
ARG BUCK_VERSION=v2018.02.16.01

View File

@ -128,9 +128,9 @@
"lint": "eslint .",
"prettier": "find . -name node_modules -prune -or -name '*.js' -print | xargs prettier --write",
"start": "/usr/bin/env bash -c './scripts/packager.sh \"$@\" || true' --",
"docker-setup-android": "docker pull hramos/android-base:latest",
"docker-build-android-base": "docker build -t hramos/android-base -f ContainerShip/Dockerfile.android-base .",
"docker-build-android": "docker build -t react/android -f ContainerShip/Dockerfile.android .",
"docker-setup-android": "docker pull reactnativeci/android-base:latest",
"docker-build-android-base": "docker build -t reactnativeci/android-base -f ContainerShip/Dockerfile.android-base .",
"docker-build-android": "docker build -t reactnativeci/android -f ContainerShip/Dockerfile.android .",
"test-android-run-instrumentation": "docker run --cap-add=SYS_ADMIN -it react/android bash ContainerShip/scripts/run-android-docker-instrumentation-tests.sh",
"test-android-run-unit": "docker run --cap-add=SYS_ADMIN -it react/android bash ContainerShip/scripts/run-android-docker-unit-tests.sh",
"test-android-run-e2e": "docker run --privileged -it react/android bash ContainerShip/scripts/run-ci-e2e-tests.sh --android --js",