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
Build your APK beyond Docker #dockerlt
Search
Rize MISUMI
October 14, 2015
Technology
2.9k
2
Share
Build your APK beyond Docker #dockerlt
at Docker 実践 LT
Rize MISUMI
October 14, 2015
More Decks by Rize MISUMI
See All by Rize MISUMI
5 Smashing Changes Your Extension Will Encounter #phpblt
misumirize
0
3k
Effective Espresso #roppongi_aar
misumirize
0
2.5k
某イベントを支えるRuby
misumirize
0
1k
Being Flux on Electron
misumirize
2
1.3k
Other Decks in Technology
See All in Technology
古今東西SRE
okaru
1
140
試作とデモンストレーション / Prototyping and Demonstrations
ks91
PRO
0
190
カオナビに Suspenseを導入するまで / The Road to Suspense at kaonavi
kaonavi
1
430
需要創出(Chatwork)×供給(BPaaS) フライホイールとMoat 実行能力の最適配置とAI戦略
kubell_hr
0
2.1k
GitHub Copilot Dev Days
tomokusaba
0
150
Oracle Cloud Infrastructure presents managed, serverless MCP Servers for Oracle AI Database
thatjeffsmith
0
120
[Oracle TechNight#99] 生成AI時代のAI/ML入門 ~ AIとオラクルデータベースの関係 (後半)
oracle4engineer
PRO
3
240
Fabric MCPの紹介と使い分け
ryomaru0825
1
150
Sociotechnical Architecture Reviews: Understanding Teams, not just Artefacts
ewolff
1
140
知ってた?JavaScriptの"正しさ"を検証するテストが5万以上もあること(Test262)
riyaamemiya
1
150
Oracle Cloud Infrastructure:2026年4月度サービス・アップデート
oracle4engineer
PRO
0
370
会社説明資料|株式会社ギークプラス ソフトウェア事業部
geekplus_tech
0
200
Featured
See All Featured
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
380
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
290
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
350
[SF Ruby Conf 2025] Rails X
palkan
2
1k
Exploring anti-patterns in Rails
aemeredith
3
350
My Coaching Mixtape
mlcsv
0
120
How to make the Groovebox
asonas
2
2.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
180
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.3k
The SEO Collaboration Effect
kristinabergwall1
1
440
Transcript
Build your APK beyond Docker Misumi_Rize / Docker࣮ફLT (Oct. 14,
2015)
Log.d("introduction", me); → Twitter @Misumi_Rize → GitHub @MisumiRize → I'm
not Android APK developer
Software Engineer in Test
Testing strategy 1. Unit tests 2. Instrumentation tests 3. Acceptance
tests 4. Exploratory tests
Testing tools 1. JUnit, Mockito 2. Espresso 3. UIAutomator, Appium
4. Human power
Testing APK is difficult → Developer specific problem → CI
service specific problem → APK's state (SQLite, Preference, etc.)
Container CI
Container as CI Service → Docker as a function (Travis
CI, CircleCI, Wercker) → Based on Docker (Drone)
Docker is protocol
https://hub.docker.com/r/misumirize/android-sdk https://github.com/MisumiRize/dockerfiles/tree/ master/android-sdk
FROM misumirize/android-sdk RUN mkdir /project COPY . /project WORKDIR /project
RUN echo "sdk.dir=$ANDROID_HOME" > local.properties ENTRYPOINT ["./gradlew"] CMD ["tasks"]
Run unit tests and generate APK $ docker build -t
android-build . $ docker run android-build build
How can we automate Activity tests?
Too slow and frustrating ARM emulator cf. Travis CI $
echo no | android create avd --force \ --name test --target android-23 --abi armeabi-v7a $ emulator64-arm -avd test -no-skin -no-audio -no-window & $ android-wait-for-emulator $ adb shell input keyevent 82 & $ ./gradlew connectedCheck
Can we connect to another host (e.g. which real device
is connected) from container?
Problem: → ./gradlew connectedCheck wraps ADB client → We can't
configure the host of ADB client → ADB server binds to the loopback address only
Solution: HAProxy
None
Client (container) frontend local_adb_server bind 127.0.0.1:5037 mode tcp default_backend remote_adb_server
backend remote_adb_server mode tcp server remote01 123.45.67.89:5036 check
Server (devices connected) frontend remote_adb_server bind *:5036 mode tcp default_backend
internal_adb_server backend internal_adb_server mode tcp server internal01 127.0.0.1:5037 check
Separating role is important
https://hub.docker.com/r/misumirize/android- remote-client https://github.com/MisumiRize/dockerfiles/tree/ master/android-remote-client
FROM misumirize/android-remote-client CMD ["connectedAndroidTest", "--stacktrace"]
misumirize/android-remote-client ONBUILD COPY haproxy.cfg /etc/haproxy/haproxy.cfg ONBUILD COPY . /project WORKDIR
/project ONBUILD RUN echo "sdk.dir=$ANDROID_HOME" > local.properties ENTRYPOINT ["execute-remote"]
ONBUILD is awesome!
But a little dirty hack is needed... build.gradle com.android.ddmlib.DdmPreferences.setTimeOut(60000)
Example: Connect Docker (CircleCI) and DigitalOcean Droplet (Android Atom emulator
working)
Example https://github.com/MisumiRize/HackerNews- Android https://circleci.com/gh/MisumiRize/HackerNews- Android/22 → circle.yml → Vagrantfile
Conclusion → Docker is protocol → Separating role (even forcefully)
is important → ONBUILD is useful. Consider using ONBUILD
Thank you!
→ Android Lineup - Shadow by Rob Bulmahn → Desastrosos
by srgpicker → cyclotron by Robert Couse-Baker → Containing the containers by Erik Söderström → Nexus 7 with Android 5 by Yuri Samoilov → IMAG0191 by Robert → Hornby Separated Bike Lane by Paul Krueger → A Street Called Awesome by Selena N. B. H.