Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Android meets Docker
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jing Li
October 17, 2017
Programming
0
150
Android meets Docker
Presented at DockerCon EU 2017
Jing Li
October 17, 2017
Tweet
Share
More Decks by Jing Li
See All by Jing Li
Android meets Docker
thyrlian
0
260
Android meets Docker
thyrlian
1
77
Android meets Docker
thyrlian
1
200
Android meets Docker
thyrlian
0
54
Android meets Docker
thyrlian
0
56
Other Decks in Programming
See All in Programming
CSC307 Lecture 09
javiergs
PRO
1
830
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
ぼくの開発環境2026
yuzneri
0
210
CSC307 Lecture 08
javiergs
PRO
0
670
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
Fragmented Architectures
denyspoltorak
0
150
CSC307 Lecture 05
javiergs
PRO
0
500
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
960
MUSUBIXとは
nahisaho
0
130
CSC307 Lecture 02
javiergs
PRO
1
780
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
2
680
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Code Review Best Practice
trishagee
74
20k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
GitHub's CSS Performance
jonrohan
1032
470k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Designing Powerful Visuals for Engaging Learning
tmiket
0
230
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Transcript
Android Meets Docker Jing Li
Developer Story
Pain in the provision ∞ machines ( e.g. mobile CI
) Admin
Containerization vs Virtualization
Why Docker? Docker Vagrant Resource Isolation Low Extreme Supported OS
Linux * Boot / Stop Time Seconds Minutes Size MB GB
Docker for Android? Infer - A tool to detect bugs
in Java and ... code. Run Android SDK update in Docker container AUFS doesn't support hardlink move operations.
Solution for SDK update Mount SDK volume in container •
Minimal • Flexible • Persist • Share
NFS ✓ In one place ? Performance ⾠ No concurrent
writing
Benchmark
Performance Comparison 2 build types, 107 unit tests ( x2
= 214 ), 2 UI tests ./gradlew clean check :demo:connectedAndroidTest On-premises Docker (w/ cached AndroidSDK) 6 mins 48.0 secs Other online CI solutions (w/o optimization) > 10 mins
Android Devices • ARM emulator • x86 emulator (requires KVM)
• USB (needs privileged mode, ⛔ for macOS) • Wifi • Genymotion Cloud
Performance of 2 UI tests ARM emulator @ 2 mins
4.615 secs x86 emulator @ (on Linux Host) 23.497 secs Genymotion 25.335 secs
Out Of Memory
Memory Matters JVM is not container aware _JAVA_OPTIONS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
Exit Code 137 = 128 + 9 = SIGKILL = Killed 1 = SIGHUP = Hangup Comment killed by the kernel OOM killer JVM terminates the program and exits
Can we get any better? Gradle distributions
Gradle distributions mirror server • From: gradle/wrapper/gradle-wrapper.properties • To: ~/.gradle/wrapper/dists
• SSL certificate - needs to be trusted by Java keystore • /etc/hosts
And better? Gradle caches • Don’t waste time downloading dependencies
• ~/.gradle/caches/
Reveal • Encoding problem expected:<Hall[]chen> but was:<Hall[ö]chen> • Hard coded
Timezone in test expected: 2099-12-31T00:00:00.0000+0200 but was : 2099-12-31T00:00:00.0000+0000 • File & Path File#listFiles() -> File[] (sort order depends on OS) Machine-dependent Problem
What Else for Mobile • Integration Test • Prod /
Test server • unreliable network • complex setup • Docker • out of the box for mobile dev • Something else • Serverless ( Kotlin, Swift ) - reuse code
Thank you! ! thyrlian " thyrlian Docker Image: https://github.com/thyrlian/AndroidSDK