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
軽量なDockerイメージで CIのビルド時間を短くしてみる
Search
Ryosuke Horie
May 10, 2017
Programming
2
1.4k
軽量なDockerイメージで CIのビルド時間を短くしてみる
https://github.com/horie1024/WerckerAndroidSample
Ryosuke Horie
May 10, 2017
Tweet
Share
More Decks by Ryosuke Horie
See All by Ryosuke Horie
GitHub Copilotは開発者の生産性をどれだけ上げるのか?ZOZOでの全社導入とその効果 / How Much Does GitHub Copilot Improve Developer Productivity? The Company-wide Implementation and Its Effects at ZOZO
horie1024
35
24k
ZOZOTOWNにおける開発生産性向上に関する取り組み / Initiatives to Improve Development Productivity at ZOZOTOWN
horie1024
8
5.9k
How does the Relay connect Android app development and Design?
horie1024
2
1.8k
既存画面の Jetpack Composeでの書き換え: FAANSでの事例紹介 / Case study of rewriting existing screens with Jetpack Compose
horie1024
0
1.6k
スキルマップを作った話 / Create a skills map
horie1024
3
4.4k
Miroを使った開発効率向上のための取り組み / Using Miro Efforts to Improve Development Efficiency
horie1024
0
2.3k
ktlintカスタムルールのパッケージ化と再利用/Package and reuse ktlint custom rules
horie1024
1
1.1k
Jetpack Benchmarkでの ViewのInflateパフォーマンスの可視化と改善 / The Jetpack Benchmark. Visualizing and improving View Inflate performance
horie1024
3
1.1k
ZOZOTOWNでの Dagger Hilt対応について/Migration to Dagger Hilt at ZOZOTOWN.
horie1024
1
2k
Other Decks in Programming
See All in Programming
DevTools extensions で 独自の DevTool を開発する | FlutterKaigi 2024
kokiyoshida
0
130
CSC509 Lecture 13
javiergs
PRO
0
110
Realtime API 入門
riofujimon
0
150
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
1.1k
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.4k
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.9k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
140
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
140
イベント駆動で成長して委員会
happymana
1
340
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
130
Featured
See All Featured
Scaling GitHub
holman
458
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Practical Orchestrator
shlominoach
186
10k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Teambox: Starting and Learning
jrom
133
8.8k
Designing for Performance
lara
604
68k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Transcript
ܰྔͳDockerΠϝʔδͰ CIͷϏϧυ࣌ؒΛͯ͘͠ΈΔ Android Testing Bootcamp #6 Ryosuke Horie VASILY, inc.
ࣗݾհ @Horie1024 ▸ ງߐ ྄հ / Ryosuke Horie ▸ લ৬:
ϙʔλϧαΠτ Web / ΞϓϦ։ൃ ▸ 2લʹVASILYʹத్ೖࣾ ▸ AndroidΤϯδχΞ ▸ ࠷ۙiOSͷϓϩδΣΫτʹࢀՃ ▸ Twitter GitHub Qiita: @Horie1024
ൃද༰ ൃද༰ ▸ DockerʹରԠͨ͠CIαʔϏε͕࠷ۙଟ͍ ▸ CIαʔϏεDockerΠϝʔδΛωοτϫʔΫӽ͠ʹPull ▸ ͦͷͨΊΠϝʔδͷαΠζॏཁ ▸ ΠϝʔδΛܰྔԽ͢Δํ๏Λࢼߦࡨޡ
▸ ϕʔεΠϝʔδΛมߋɺAndroid SDKͷ༰ྔݮ ▸ Pullʹֻ͔Δ࣌ؒॖ -> Ϗϧυ͕࣌ؒ͘ͳΔͷͰʁ
DockerʹରԠͨ͠CIαʔϏε ࠷ۙͷCIαʔϏε ▸ ϏϧυڥΛDockerΠϝʔδͰ༻ҙͰ͖Δ ▸ Wercker ▸ Drone ▸ CircleCI
▸ Travis CI
DockerʹରԠͨ͠CIαʔϏε DockerΠϝʔδͷཧ ▸ ϨδετϦαʔϏεΛར༻ ▸ Docker Hub ▸ Google Container
Registry ▸ Amazon ECR ▸ QUAY.io Amazon ECR
DockerʹରԠͨ͠CIαʔϏε DockerΠϝʔδͷPull ▸ ΠϝʔδΛϨδετϦ͔ΒPull ▸ Ϗϧυ࣌ؒʹؚ·ΕΔ ▸ Πϯλʔωοτܦ༝ ▸ ΠϝʔδͷαΠζΛແࢹͰ͖ͳ͍
Amazon ECR
ΠϝʔδͷܰྔԽ ΠϝʔδαΠζͷݮ ▸ ΠϝʔδΛPull͢Δ࣌ؒͷॖ ▸ Ϗϧυ࣌ؒͷॖʹܨ͕Δ ▸ ͍ܰͷྑ͍
ΠϝʔδͷܰྔԽ Ͳ͏ܰྔԽ͢Δͷ͔ʁ ▸ ܰྔͳOSΛϕʔεΠϝʔδʹ͢Δ ▸ ෆཁͳύοέʔδΛΠϯετʔϧ͠ͳ͍
ΠϝʔδͷܰྔԽ Ͳ͏ܰྔԽ͢Δͷ͔ʁ ▸ ܰྔͳOSΛϕʔεΠϝʔδʹ͢Δ ▸ ෆཁͳύοέʔδΛΠϯετʔϧ͠ͳ͍
ΠϝʔδͷܰྔԽ Alpine Linux ▸ ඇৗʹܰྔͳLinux distribution ▸ ެࣜͷDockerΠϝʔδͰ࠾༻ ▸ Alpine
LinuxΛϕʔεͷΠϝʔδʹ ▸ ΠϝʔδαΠζͷݮʹޮՌେ
Πϝʔδͷ࡞ ૉͷΠϝʔδαΠζൺֱ IMAGE SIZE ubuntu: 16.04 117 MB alpine: 3.5
3.99 MB ▸ ubuntuͱൺֱͯ͠ѹతʹ͍ܰ ▸ ͜ͷαΠζࠩɺΠϝʔδ͕ܰ͘ͳΔͣ
ΠϝʔδͷܰྔԽ Android SDKΛμϯϩʔυͨ͠ঢ়ଶ IMAGE SIZE ubuntu: 16.04 2.05 GB alpine:
3.5 1.58 GB ▸ android-sdk_r24.4.1-linux͕ϕʔε ▸ android sdk update ▸ android-25, build-tools-25.0.3 ▸ extra-google-m2repository ▸ extra-android-m2repository ▸ 500 MBͷࠩ ▸ ͦͦAndroid SDK͕ॏ͗͢Ͱ
ΠϝʔδͷܰྔԽ Docker Hub্Ͱͷൺֱ ▸ Docker HubʹΠϝʔδΛ্͛ͨঢ়ଶ ▸ ѹॖޙͷΠϝʔδαΠζ྆ํ 1 GB
▸ ͋ΕɺαΠζ͕มΘΒͳ͍ɾɾʁ
Ͳ͏͠Α͏
ΠϝʔδͷܰྔԽ WerckerͰPullʹֻ͔Δ࣌ؒͷൺֱ ▸ औΓ͑ͣൺֱ ▸ 5ճฏۉ ▸ WerckerͷΩϟογϡ͕ޮ͍͍ͯͳ͍ঢ়ଶ ▸ alpineϕʔεͷΠϝʔδͷํ͕͍ʂ
IMAGE TIME ubuntu: 16.04 54.2 s alpine: 3.5 46.8 s
ΠϝʔδͷܰྔԽ Ͳ͏ܰྔԽ͢Δͷ͔ʁ ▸ ܰྔͳOSΛϕʔεΠϝʔδʹ͢Δ ▸ ෆཁͳύοέʔδΛΠϯετʔϧ͠ͳ͍
ΠϝʔδͷܰྔԽ Ͳ͏ܰྔԽ͢Δͷ͔ʁ ▸ ܰྔͳOSΛϕʔεΠϝʔδʹ͢Δ ▸ ෆཁͳύοέʔδΛΠϯετʔϧ͠ͳ͍
ΠϝʔδͷܰྔԽ Android SDKͷ༰ྔݮ ▸ ࠷ۙϛχϚϜͳSDK͕μϯϩʔυͰ͖Δ ▸ android-sdk_r24.4.1-linux 570 MB ▸
sdk-tools-linux-3859397 160 MB
ΠϝʔδͷܰྔԽ Android SDKΛμϯϩʔυͨ͠ঢ়ଶ IMAGE SIZE ubuntu: 16.04 1.53 GB alpine:
3.5 1.04 GB ▸ sdk-tools-linux-3859397͕ϕʔε ▸ androidίϚϯυ͕deprecated ▸ sdkmanagerΛ༻ ▸ android-25, build-tools-25.0.3 ▸ extra-google-m2repository ▸ extra-android-m2repository ▸ 500 MBͷࠩͳͷมΘΒͳ͍
ΠϝʔδͷܰྔԽ WerckerͰPullʹֻ͔Δ࣌ؒͷൺֱ ▸ 5ճฏۉ ▸ ΠϝʔδαΠζͷܰྔԽͰ্ ▸ 10ඵҎ্͘ͳͬͨ IMAGE TIME
ubuntu: 16.04 39.4 s alpine: 3.5 30.2 s
ΠϝʔδͷܰྔԽ Alpine LinuxϕʔεͷΠϝʔδ͕ྑͦ͞͏ ▸ ࠷Πϝʔδ͕ܰྔ ▸ Pullʹֻ͔Δ͍࣌ؒ ▸ ͔͠͠ ▸
AndroidΛϏϧυͰ͖͍ͯͳ͍(5/10 18:00ݱࡏ)
ΠϝʔδͷܰྔԽ Alpine LinuxͰͷቕΓ ▸ sdkmanager͕࣮ߦͰ͖ͳ͍ ▸ Alpine LinuxͰbash͕ೖ͍ͬͯͳ͍ͷ͕ݪҼ ▸ aapt͕࣮ߦͰ͖ͳ͍
▸ Cannot run program "aapt": error=2, No such file or directory ▸ glibc͕ೖ͍ͬͯͳ͍ɻAlpineͰglibcΛೖΕΔͷʹቕ·Δɻ ▸ lib.so.1͕ແ͍ͱౖΒΕΔɻ ▸ aapt32bit൛ͷglibcͰͳ͚ΕͳΒͳ͍ ▸ 32bit൛ͷglibcΛΠϯετʔϧ <- ࠓ͜͜Ͱ ٧·Δ
·ͱΊ
·ͱΊ ▸ DockerΠϝʔδͷܰྔԽେ ▸ ϕʔεΠϝʔδͷมߋɺAndroid SDKͷαΠζݮޮՌత ▸ Alpine Linuxͷߏඞཁ࠷খݶͷͨΊቕ·ΔՄೳੑ͋Γ ▸
DebianɺArch LinuxͰࢼ͢ͱ͋·Γቕ·ΒͣʹܰྔԽͰ͖Δ͔͠Εͳ͍ ▸ ·ͣAndroid SDKͷݮ͔ΒखΛ͚Δͷ͕ྑͦ͞͏ ▸ androidίϚϯυ͕deprecatedʹͳͬͨͷྑ͍ػձ
͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ
appendix ʲิʳWerckerͷΠϝʔδΩϟογϡ ▸ Werckerͷ߹ΠϝʔδͷΩϟογϡΛউखʹͯ͘͠ΕΔ ▸ Ωϟογϡ͕͋Δ߹ΠϝʔδͷPullʹɺ1~2ඵ͔͔͔͠Βͳ͍ ▸ Ωϟογϡ͕ແ͍߹ͷϏϧυ࣌ؒͷॖʹΠϝʔδͷܰྔԽޮՌ͕͋Δ