Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Alpine Linux ノススメ
Search
y13i
October 12, 2016
Technology
7k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Alpine Linux ノススメ
y13i
October 12, 2016
More Decks by y13i
See All by y13i
Alexa と Polly と私
y13i
0
630
AWS Advanced Users Meetup vol.2
y13i
0
260
2014-06-20 JAWS-UG Tokyo
y13i
0
700
JAWS-UG Nagano Kickoff Meeting
y13i
6
4.5k
Other Decks in Technology
See All in Technology
あけおめLINE 傾向とその対策
nasa9084
0
180
時うどん〜Socket.getifaddrsで学ぶネットワーク編 / Tokiudon: The Socket.getifaddrs Edition
coe401_
3
180
白金鉱業Meetup Vol.25 アウトカムが二値のデータに対するCausal Impact
brainpadpr
0
260
2026-09-18 gotanda.sre Terraformで複数環境作ったり、複数Stateに分割したりそれとTerragrunt / Terraform multi envs and multi states
masasuzu
3
640
AIに任せた品質は、誰が見立てるのか - AI時代のテストマネジメント
nakanao
3
2.5k
俺の仕事は AIに奪われないし、たぶんその BIも要らない
hikaruri
0
520
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
360
AI時代の「技術的負債」の変質ー概念の終焉と再解釈、エージェントと共に向かう先
nwiizo
1
2.9k
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
AIエージェントの一手は 誰も見ていない - Falco拡張OSS「Prempti」とeBPFで サーバーレス実行基盤を二層防御する
keitah
0
340
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
3
960
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Automating Front-end Workflow
addyosmani
1369
210k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Odyssey Design
rkendrick25
PRO
2
810
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
500
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
A Modern Web Designer's Workflow
chriscoyier
699
190k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Transcript
ϊεεϝ ΞΠϨοτגࣜձࣾcloudpack ࢁޱ༩ྗ @ Web Tech Tokyo #1ʢDocker Tips ڞ༗ձʣ
2016-10-12
୭ʁ • ໊લ: ࢁޱ ༩ྗʢ·͙ͪ ΑΓ͖ʣ • ۈઌ: ΞΠϨοτגࣜձࣾ cloudpackࣄۀ෦
• ͖ͳݴޠ: Ruby, JavaScript • URL: https://y13i.com/
Alpine Linux ͬͯʁ • ܰྔ Linux • ίϯςφʔ༻ OS ͱͯ͠
Docker ͱ૬ੑ͕ྑ͘ɺ࠷ۙ Α͘ར༻͞Ε͍ͯΔ • BusyBox ͕ϕʔεʹͳ͍ͬͯΔ • γΣϧ ash • ύοέʔδཧ apk
͍ܰʂ Image Size Ubuntu 127.1 MB CentOS 196.8 MB Alpine
4.8 MB BusyBox 1.1 MB
ͲΕ͘Β͍͍ܰͷ͔ʁ • `docker pull` ͯ͠ hello world ͢Δ·Ͱ͔͔Δ࣌ؒΛܭ ଌͯ͠Έͨ vs
Ubuntu ~ time docker run -t --rm ubuntu:latest /bin/bash -c 'echo "Hello world."' Unable to find image 'ubuntu:latest' locally latest: Pulling from library/ubuntu cad964aed91d: Pull complete 3a80a22fea63: Pull complete 50de990d7957: Pull complete 61e032b8f2cb: Pull complete 9f03ce1741bf: Pull complete Digest: sha256:28d4c5234db8d5a634d5e621c363d900f8f241240ee0a6a978784c978fe9c737 Status: Downloaded newer image for ubuntu:latest Hello world. 17.23 real 0.04 user 0.04 sys ~ time docker run -t --rm alpine:latest /bin/ash -c 'echo "Hello world."' Unable to find image 'alpine:latest' locally latest: Pulling from library/alpine c0cb142e4345: Pull complete Digest: sha256:ca7b185775966003d38ccbd9bba822fb570766e4bb69292ac23490f36f8a742e Status: Downloaded newer image for alpine:latest Hello world. 6.07 real 0.02 user 0.02 sys
ܰ͞ͷͻΈͭ • `ls -la /bin` ͯ͠ΈΑ͏ ~ docker run -t
--rm alpine:latest /bin/ash -c 'ls -la /bin' total 796 drwxr-xr-x 2 root root 4096 Sep 22 23:30 . drwxr-xr-x 24 root root 4096 Oct 11 05:59 .. lrwxrwxrwx 1 root root 12 Sep 22 23:30 ash -> /bin/busybox lrwxrwxrwx 1 root root 12 Sep 22 23:30 base64 -> /bin/busybox lrwxrwxrwx 1 root root 12 Sep 22 23:30 bbconfig -> /bin/busybox -rwxr-xr-x 1 root root 805032 Aug 12 14:38 busybox lrwxrwxrwx 1 root root 12 Sep 22 23:30 cat -> /bin/busybox lrwxrwxrwx 1 root root 12 Sep 22 23:30 catv -> /bin/busybox lrwxrwxrwx 1 root root 12 Sep 22 23:30 chgrp -> /bin/busybox lrwxrwxrwx 1 root root 12 Sep 22 23:30 chmod -> /bin/busybox lrwxrwxrwx 1 root root 12 Sep 22 23:30 chown -> /bin/busybox ... ~ docker run -t --rm alpine:latest /bin/ash -c 'ls -la /usr/bin' total 188 drwxr-xr-x 2 root root 4096 Sep 22 23:30 . drwxr-xr-x 7 root root 4096 Sep 22 23:30 .. lrwxrwxrwx 1 root root 12 Sep 22 23:30 [ -> /bin/busybox lrwxrwxrwx 1 root root 12 Sep 22 23:30 [[ -> /bin/busybox lrwxrwxrwx 1 root root 12 Sep 22 23:30 awk -> /bin/busybox lrwxrwxrwx 1 root root 12 Sep 22 23:30 basename -> /bin/busybox ...
BusyBox ͱԿ͕ҧ͏ʁ • BusyBox σʔλϘϦϡʔϜίϯςφʔʢଞͷί ϯςφʔ͔ΒϘϦϡʔϜͱͯ͠Ϛϯτͯ͠ɺϑΝ ΠϧΛอ࣋͢Δ͚ͩͷίϯςφʔʣͱͯ͠Α͘Θ ΕΔ • BusyBox
ͰԿ͔Λ࣮ߦ͢ΔڥΛ༻ҙ͢Δͷେ ม…… • Alpine ʹ apk ͕͋Δʂ
apk ͍Ζ͍ΖḿΔ • `--no-cache` Ͱ Dockerfile Λॻ͘ͷ͕ḿΔʢapt, yum Πϯετʔϧޙʹ໌ࣔతʹΩϟογϡআͷ εςοϓ͕ඞཁʣɺͦͯ͠ૣ͍
~ time docker run -t --rm ubuntu:latest /bin/bash -c "apt update && apt -y install ruby && apt clean && ruby --version" ... ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu] 44.45 real 0.03 user 0.05 sys ~ time docker run -t --rm alpine:latest /bin/ash -c "apk --no-cache add ruby && ruby --version" ... ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux-musl] 6.47 real 0.01 user 0.01 sys ~ time docker run -t --rm centos:latest /bin/bash -c "yum -y install ruby && yum clean all && ruby --version" ... ruby 2.0.0p598 (2014-11-13) [x86_64-linux] 12.23 real 0.02 user 0.05 sys
apk ͍Ζ͍ΖḿΔ Ruby Node.js Redis Ubuntu 2.3.1 4.2.6 3.0.6 CentOS
(with epel) 2.0.0 6.7.0 2.8.19 Alpine 2.3.1 6.2.0 3.2.0 • ύοέʔδͷόʔδϣϯ͕݁ߏ৽͍͠ ※ͯ͢2016-10-12࣌Ͱͷlatest
͏طʹ݁ߏͳਓؾΈ͍ͨ • ຊޠͷใ͔ͳΓώοτ͢Δ • Docker Hub Ͱ Alpine ϕʔεͷΠϝʔδΛݟΔ͜ͱ ଟ͘ͳͬͨ
• `ruby:2.3.1-alpine` • `nginx:mainline-alpine` • ʢ৽ຯʹ͚ܽΔωλͰ͢Έ·ͤΜ…ʣ
ͷ ͬ͘͟ΓհͰͨ͠