Skip to content

Commit 3bc2696

Browse files
hramosfacebook-github-bot
authored andcommitted
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 facebook#19192 Differential Revision: D7939209 Pulled By: hramos fbshipit-source-id: 0f845a8fffbf8f5b9cecef4fa0ba802bc755f7aa
1 parent 9d0b7d8 commit 3bc2696

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

ContainerShip/Dockerfile.android

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
FROM hramos/android-base:latest
1+
# React Native Android Unit Tests
2+
#
3+
# This image builds upon the React Native Base Android Development Environment
4+
# image. Ideally, this image would be rebuilt with any new commit to the master
5+
# branch. Doing so will catch issues such as BUCK failing to fetch dependencies
6+
# or run tests, as well as unit test failures.
7+
FROM reactnativeci/android-base:latest
8+
9+
LABEL Description="This image prepares and runs React Native's Android tests." maintainer "Héctor Ramos <[email protected]>"
210

311
# set default environment variables
412
ENV GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs=\"-Xmx512m -XX:+HeapDumpOnOutOfMemoryError\""

ContainerShip/Dockerfile.android-base

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1+
# React Native Base Android Development Environment
2+
#
3+
# This image provides a base Android development environment for React Native,
4+
# including, but not limited to, the Android SDK, Android NDK, Node, and BUCK.
5+
# These are required in order to run React Native's Android unit and integration
6+
# tests.
7+
#
8+
# This image is not currently built automatically as part of React Native's CI
9+
# infrastructure. It should not be necessary to rebuild this image while the
10+
# Android dependencies (Android SDK version, build tools version, etc) remain
11+
# equal. The operations performed to build this image are those that tend to
12+
# remain stable across commits in any given React Native release.
13+
114
FROM library/ubuntu:16.04
215

16+
LABEL Description="This image provides a base Android development environment for React Native, and may be used to run tests." maintainer "Héctor Ramos <[email protected]>"
17+
318
# set default build arguments
419
ARG ANDROID_TOOLS_VERSION=25.2.5
520
ARG BUCK_VERSION=v2018.02.16.01

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@
128128
"lint": "eslint .",
129129
"prettier": "find . -name node_modules -prune -or -name '*.js' -print | xargs prettier --write",
130130
"start": "/usr/bin/env bash -c './scripts/packager.sh \"$@\" || true' --",
131-
"docker-setup-android": "docker pull hramos/android-base:latest",
132-
"docker-build-android-base": "docker build -t hramos/android-base -f ContainerShip/Dockerfile.android-base .",
133-
"docker-build-android": "docker build -t react/android -f ContainerShip/Dockerfile.android .",
131+
"docker-setup-android": "docker pull reactnativeci/android-base:latest",
132+
"docker-build-android-base": "docker build -t reactnativeci/android-base -f ContainerShip/Dockerfile.android-base .",
133+
"docker-build-android": "docker build -t reactnativeci/android -f ContainerShip/Dockerfile.android .",
134134
"test-android-run-instrumentation": "docker run --cap-add=SYS_ADMIN -it react/android bash ContainerShip/scripts/run-android-docker-instrumentation-tests.sh",
135135
"test-android-run-unit": "docker run --cap-add=SYS_ADMIN -it react/android bash ContainerShip/scripts/run-android-docker-unit-tests.sh",
136136
"test-android-run-e2e": "docker run --privileged -it react/android bash ContainerShip/scripts/run-ci-e2e-tests.sh --android --js",

0 commit comments

Comments
 (0)