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
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
620
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
[ChatGPT Work LT]事務作業が苦手な人のための バックオフィスの「半」自動化
chimaki_iot
0
280
Agent 時代の Kaggle 展望 / kaggle-in-the-agentic-era
upura
1
700
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
私がブラウザを自作したくなった理由
supurazako
1
200
【AG-UI × A2UI × MCP Apps】Generative UIをやさしく解説する
nrinetcom
PRO
1
110
QAエンジニア起点で進める、SmartHRにおける信頼性向上について
kaomi_wombat
1
140
Pavlokで始める電撃駆動開発
sgrsn
0
190
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
220
変化の早いClaude Codeを 書籍に落とし込む
oikon48
7
1.4k
AWS ネットワーク構築でハマった(ハマりかけた) 5選とそこから得た教訓
nagisa53
4
210
【CEDEC2026】『GRANBLUE FANTASY: Relink - Endless Ragnarok』のバトル制作事例 ~最高のキャラゲーを目指して~
cygames
PRO
0
250
TypeScript入門 2026
recruitengineers
PRO
3
560
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
370
AI: The stuff that nobody shows you
jnunemaker
PRO
9
900
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
480
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
440
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
200
The Curious Case for Waylosing
cassininazir
1
450
Writing Fast Ruby
sferik
630
63k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Raft: Consensus for Rubyists
vanstee
141
7.6k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
260
Six Lessons from altMBA
skipperchong
29
4.4k
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` • ʢ৽ຯʹ͚ܽΔωλͰ͢Έ·ͤΜ…ʣ
ͷ ͬ͘͟ΓհͰͨ͠