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
23k
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
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
役立つログに取り組もう
irof
28
9.6k
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Contemporary Test Cases
maaretp
0
130
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
320
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
最新TCAキャッチアップ
0si43
0
140
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
65
4.4k
Music & Morning Musume
bryan
46
6.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Designing for Performance
lara
604
68k
Bash Introduction
62gerente
608
210k
The Pragmatic Product Professional
lauravandoore
31
6.3k
KATA
mclloyd
29
14k
We Have a Design System, Now What?
morganepeng
50
7.2k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
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ඵ͔͔͔͠Βͳ͍ ▸ Ωϟογϡ͕ແ͍߹ͷϏϧυ࣌ؒͷॖʹΠϝʔδͷܰྔԽޮՌ͕͋Δ