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
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
250
Android meets Docker
thyrlian
1
74
Android meets Docker
thyrlian
1
190
Android meets Docker
thyrlian
0
52
Android meets Docker
thyrlian
0
54
Other Decks in Programming
See All in Programming
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
310
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
440
GitHubとGitLabとAWS CodePipelineでCI/CDを組み比べてみた
satoshi256kbyte
4
220
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
520
機能追加とリーダー業務の類似性
rinchoku
2
1.3k
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
420
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
310
Cache Me If You Can
ryunen344
2
680
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
6
2.4k
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
250
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
390
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
320
Featured
See All Featured
BBQ
matthewcrist
89
9.8k
Music & Morning Musume
bryan
46
6.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
What's in a price? How to price your products and services
michaelherold
246
12k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
Visualization
eitanlees
148
16k
We Have a Design System, Now What?
morganepeng
53
7.8k
Side Projects
sachag
455
43k
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