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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Jing Li
October 17, 2017
Programming
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Android meets Docker
Presented at DockerCon EU 2017
Jing Li
October 17, 2017
More Decks by Jing Li
See All by Jing Li
Android meets Docker
thyrlian
0
270
Android meets Docker
thyrlian
1
80
Android meets Docker
thyrlian
1
200
Android meets Docker
thyrlian
0
56
Android meets Docker
thyrlian
0
61
Other Decks in Programming
See All in Programming
net-httpのHTTP/2対応について
naruse
0
470
The NotImplementedError Problem in Ruby
koic
1
700
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
350
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
240
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
750
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
880
Inside Stream API
skrb
1
680
Oxcを導入して開発体験が向上した話
yug1224
4
300
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.3k
RTSPクライアントを自作してみた話
simotin13
0
520
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
240
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
2
790
YesSQL, Process and Tooling at Scale
rocio
174
15k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
RailsConf 2023
tenderlove
30
1.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
30 Presentation Tips
portentint
PRO
1
320
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Prompt Engineering for Job Search
mfonobong
0
340
Bash Introduction
62gerente
615
220k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
940
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