Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Docker Android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zandor Smith
Docker Android
Commits
26096565
Commit
26096565
authored
6 years ago
by
gengjiawen
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parents
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+70
-0
70 additions, 0 deletions
.gitignore
Dockerfile
+68
-0
68 additions, 0 deletions
Dockerfile
README.md
+6
-0
6 additions, 0 deletions
README.md
with
144 additions
and
0 deletions
.gitignore
0 → 100644
+
70
−
0
View file @
26096565
# Xcode
!**/*.xcodeproj
!**/*.pbxproj
!**/*.xcworkspacedata
!**/*.xcsettings
!**/*.xcscheme
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
# Gradle
/build/
/RNTester/android/app/build/
/RNTester/android/app/gradle/
/RNTester/android/app/gradlew
/RNTester/android/app/gradlew.bat
/ReactAndroid/build/
# Buck
.buckd
buck-out
/ReactAndroid/src/main/jni/prebuilt/lib/armeabi-v7a/
/ReactAndroid/src/main/jni/prebuilt/lib/x86/
/ReactAndroid/src/main/gen
# Watchman
.watchmanconfig
# Android
.idea
.gradle
local.properties
*.iml
# Node
node_modules
*.log
.nvm
/bots/node_modules/
package-lock.json
# OS X
.DS_Store
# Test generated files
/ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
*.js.meta
/coverage
/third-party
# Root dir shouldn't have Xcode project
/*.xcodeproj
# ReactCommon subdir shouldn't have Xcode project
/ReactCommon/**/*.xcodeproj
RNTester/build
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
68
−
0
View file @
26096565
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."
LABEL
maintainer="Héctor Ramos <hector@fb.com>"
# set default build arguments
ARG
SDK_VERSION=sdk-tools-linux-3859397.zip
ARG
ANDROID_BUILD_VERSION=27
ARG
ANDROID_TOOLS_VERSION=27.0.3
ARG
BUCK_VERSION=v2018.10.29.01
ARG
NDK_VERSION=17c
ARG
NODE_VERSION=8.10.0
ARG
WATCHMAN_VERSION=4.9.0
# set default environment variables
ENV
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
ENV
ADB_INSTALL_TIMEOUT=10
ENV
PATH=${PATH}:/opt/buck/bin/
ENV
ANDROID_HOME=/opt/android
ENV
ANDROID_SDK_HOME=${ANDROID_HOME}
ENV
PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
ENV
ANDROID_NDK=/opt/ndk/android-ndk-r$NDK_VERSION
ENV
PATH=${PATH}:${ANDROID_NDK}
# install system dependencies
RUN
apt-get update
&&
apt-get
install
ant autoconf automake curl g++ gcc git libqt5widgets5 lib32z1 lib32stdc++6 make maven npm openjdk-8
*
python-dev python3-dev qml-module-qtquick-controls qtdeclarative5-dev unzip
-y
# configure npm
RUN
npm config
set
spin
=
false
&&
\
npm config
set
progress
=
false
# install node
RUN
npm
install
n
-g
RUN
n
$NODE_VERSION
# download buck
RUN
git clone https://github.com/facebook/buck.git /opt/buck
--branch
$BUCK_VERSION
--depth
=
1
WORKDIR
/opt/buck
# build buck
RUN
ant
# Full reference at https://dl.google.com/android/repository/repository2-1.xml
# download and unpack android
RUN
mkdir
/opt/android
&&
\
cd
/opt/android
&&
\
curl
--silent
https://dl.google.com/android/repository/
${
SDK_VERSION
}
>
android.zip
&&
\
unzip android.zip
&&
\
rm
android.zip
# download and unpack NDK
RUN
mkdir
/opt/ndk
&&
\
cd
/opt/ndk
&&
\
curl
--silent
https://dl.google.com/android/repository/android-ndk-r
$NDK_VERSION
-linux-x86_64
.zip
>
ndk.zip
&&
\
unzip ndk.zip
&&
\
rm
ndk.zip
# Add android SDK tools
RUN
yes
| sdkmanager
--licenses
&&
sdkmanager
--update
RUN
sdkmanager
"system-images;android-19;google_apis;armeabi-v7a"
\
"platform-tools"
\
"platforms;android-
$ANDROID_BUILD_VERSION
"
\
"build-tools;
$ANDROID_TOOLS_VERSION
"
\
"add-ons;addon-google_apis-google-23"
\
"extras;android;m2repository"
# clean up unnecessary directories
RUN
rm
-rf
/opt/android/.android
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
+
6
−
0
View file @
26096565
## Official Android Image for react native
This is an implementation of https://github.com/react-native-community/discussions-and-proposals/blob/master/proposals/0003-Official-Docker.md.
Original version is split from react-native repo, see https://github.com/facebook/react-native/blob/master/ContainerShip/Dockerfile.android-base.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment