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コマンド
Search
Hiroaki ONO
November 20, 2017
Technology
2
870
Dockerコマンド
Dockerのコマンドを説明する用に自分の知識をまとめてみた
Hiroaki ONO
November 20, 2017
Tweet
Share
More Decks by Hiroaki ONO
See All by Hiroaki ONO
改正個人情報保護法実務ガイドブック輪読会_20220316
hihihiroro
0
300
実践的データ基盤への処方箋輪読会_20220203
hihihiroro
0
690
Kubernetesに入門したい
hihihiroro
47
15k
20170602_sqlstudy
hihihiroro
2
630
Other Decks in Technology
See All in Technology
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
120
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
130
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
270
Lexical Analysis
shigashiyama
1
150
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.2k
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
200
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
The Rise of LLMOps
asei
7
1.4k
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
Music & Morning Musume
bryan
46
6.2k
Automating Front-end Workflow
addyosmani
1366
200k
Being A Developer After 40
akosma
86
590k
Git: the NoSQL Database
bkeepers
PRO
427
64k
RailsConf 2023
tenderlove
29
900
Thoughts on Productivity
jonyablonski
67
4.3k
For a Future-Friendly Web
brad_frost
175
9.4k
Six Lessons from altMBA
skipperchong
27
3.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Transcript
%PDLFSίϚϯυ v1.0 @hihihiroro
%PDLFSͬͯ·͔͢ʁ
ίϚϯυଟ͘ͳ͍Ͱ͔͢ʁ
https://docs.docker.com/engine/reference/commandline/docker/#child-commands
https://docs.docker.com/engine/reference/commandline/docker/#child-commands ීஈ͏ίϚϯυ ͜Μͳʹඞཁͳ͍ʢࢲݟʣ
͜ͷεϥΠυͷత w͏͜ͱͷଟ͍%PDLFSίϚϯυΛ͍֮͑ͨ wΑ͘͏ίϚϯυʹߜΔ wίϚϯυʹΑΔભҠΛཧղ͢Δ wֆͰ֮͑Δ
ର w%PDLFSͷ͜ͱΛগͬͯ͠Δ wॳݟͷਓ͝ΊΜͳ͍͞ w୯ޠࡉ͔͍આ໌ল͍͍ͯ·͢ wΦϓγϣϯʹ͍ͭͯجຊઆ໌͠·ͤΜ wৄ͍͜͠ͱΛΓ͚ͨΕެࣜυΩϡϝϯτ
ͯͳΘ͚Ͱਤղ
SNJ EFMFUFE TUPQQFE QVTI MPHT EJGG JOTQFDU SN QVMM TUBSU
FYFD BUUBDI TUPQLJMM QBVTF QBVTFE QT CVJME VOQBVTF FYQPSU SVO DPNNJU JNQPSU TBWF JNBHFT IJTUPSZ JOTQFDU SVOOJOH UBHT MPBE IUUQTHJUIVCDPNEPDLFSEJTUSJCVUJPO EFTJHOFECZGSPN'MBUJDPO
SNJ EFMFUFE TUPQQFE QVTI MPHT EJGG JOTQFDU SN QVMM TUBSU
FYFD BUUBDI TUPQLJMM QBVTF QBVTFE QT CVJME VOQBVTF FYQPSU SVO DPNNJU JNQPSU TBWF JNBHFT IJTUPSZ JOTQFDU SVOOJOH UBHT MPBE IUUQTHJUIVCDPNEPDLFSEJTUSJCVUJPO EFTJHOFECZGSPN'MBUJDPO ίϯςφଆૢ࡞ Πϝʔδଆૢ࡞
Ҏ্ɻ
͔͜͜ΒίϚϯυͷઆ໌
Πϝʔδଆૢ࡞༻
SNJ EFMFUFE TUPQQFE QVTI MPHT EJGG JOTQFDU SN QVMM TUBSU
FYFD BUUBDI TUPQLJMM QBVTF QBVTFE QT CVJME VOQBVTF FYQPSU SVO DPNNJU JNQPSU TBWF JNBHFT IJTUPSZ JOTQFDU SVOOJOH UBHT MPBE IUUQTHJUIVCDPNEPDLFSEJTUSJCVUJPO EFTJHOFECZGSPN'MBUJDPO
SNJ EFMFUFE TUPQQFE QVTI MPHT EJGG JOTQFDU SN QVMM TUBSU
FYFD BUUBDI TUPQLJMM QBVTF QBVTFE QT CVJME VOQBVTF FYQPSU SVO DPNNJU JNQPSU TBWF JNBHFT IJTUPSZ JOTQFDU SVOOJOH UBHT MPBE IUUQTHJUIVCDPNEPDLFSEJTUSJCVUJPO EFTJHOFECZGSPN'MBUJDPO ࡞ ϨδετϦͱͷ ΓͱΓ Πϝʔδૢ࡞͋Ε͜Ε Πϝʔδ®UBS
Πϝʔδଆ w JNBHFTʢΠϝʔδҰཡදࣔʣ w UBHʢΠϝʔδͷλά͚ʣ w IJTUPSZJOTQFDUʢߋ৽༰ɾৄࡉใʣ w SVOʢίϯςφͷ࣮ߦʣ w
SNJʢΠϝʔδআʣ w CVJMEʢΠϝʔδ࡞ʣ w TBWFMPBEʢΠϝʔδͷϑΝΠϧग़ྗɾೖྗʣ w QVMMQVTIʢΠϝʔδͷμϯϩʔυɾొʣ
Πϝʔδૢ࡞͋Ε͜Ε
EPDLFSJNBHFT ΠϝʔδͷҰཡΛදࣔ
EPDLFSUBH ΠϝʔδʹλάΛ͚Δ
EPDLFSIJTUPSZJOTQFDU IJTUPSZɿΠϝʔδͷߏஙཤྺΛදࣔ JOTQFDUɿΠϝʔδʹؔ͢ΔৄࡉใΛ+40/ܗࣜͰදࣔ
EPDLFSSVO Πϝʔδ͔Βίϯςφͷىಈ
EPDLFSSNJ Πϝʔδͷআ
Πϝʔδ࡞
EPDLFSCVJME %PDLFSpMF͔ΒΠϝʔδΛ࡞
Πϝʔδ®ϑΝΠϧ
EPDLFSTBWFMPBE TBWFɿΠϝʔδΛUBSΞʔΧΠϒʹอଘ MPBEɿUBSΞʔΧΠϒ͔45%*/͔ΒΠϝʔδΛಡΈࠐΉ TBWF MPBE
ϨδετϦ͋Ε͜Ε
EPDLFSQVMMQVTI QVMMɿSFHJTUSZ͔ΒΠϝʔδͷऔಘ QVTIɿSFHJTUSZΠϝʔδͷొ QVMM QVTI
EPDLFSQVMMQVTI QVMMɿSFHJTUSZ͔ΒΠϝʔδͷऔಘ QVTIɿSFHJTUSZΠϝʔδͷొ QVMM QVTI EPDLFSMPHJO SFHJTUSZͷϩάΠϯ
ίϯςφଆૢ࡞༻
SNJ EFMFUFE TUPQQFE QVTI MPHT EJGG JOTQFDU SN QVMM TUBSU
FYFD BUUBDI TUPQLJMM QBVTF QBVTFE QT CVJME VOQBVTF FYQPSU SVO DPNNJU JNQPSU TBWF JNBHFT IJTUPSZ JOTQFDU SVOOJOH UBHT MPBE IUUQTHJUIVCDPNEPDLFSEJTUSJCVUJPO EFTJHOFECZGSPN'MBUJDPO
SNJ EFMFUFE TUPQQFE QVTI MPHT EJGG JOTQFDU SN QVMM TUBSU
FYFD BUUBDI TUPQLJMM QBVTF QBVTFE QT CVJME VOQBVTF FYQPSU SVO DPNNJU JNQPSU TBWF JNBHFT IJTUPSZ JOTQFDU SVOOJOH UBHT MPBE IUUQTHJUIVCDPNEPDLFSEJTUSJCVUJPO EFTJHOFECZGSPN'MBUJDPO ఀࢭ আ Ұ࣌ఀࢭ ίϯςφૢ࡞͋Ε͜Ε ίϯςφ®UBS ίϯςφ෦͋Ε͜Ε
ίϯςφଆ w QTʢίϯςφҰཡදࣔʣ w MPHTEJGGJOTQFDUʢΠϝʔδͷμϯϩʔυɾొʣ w DPNNJUʢߋ৽༰ɾৄࡉใʣ w FYQPSUJNQPSUʢΠϝʔδͷϑΝΠϧग़ྗɾೖྗʣ w
QBVTFVOQBVTFʢΠϝʔδͷλά͚ʣ w TUPQTUBSULJMMʢΠϝʔδ࡞ʣ w FYFDBUUBDIʢΠϝʔδআʣ w SNʢʣ
ίϯςφૢ࡞͋Ε͜Ε
EPDLFSQT ίϯςφͷҰཡΛදࣔ BΦϓγϣϯͰશͯͷίϯςφΛදࣔ GΦϓγϣϯͰϑΟϧλ
EPDLFSMPHT ίϯςφͷϩάΛऔಘ ग़ྗ͞Εͨϩάͯ͢Λදࣔ ϩάͷग़ྗΛϑΥϩʔ
EPDLFSEJGG ίϯςφͷϑΝΠϧγεςϜʹର͢Δมߋͷදࣔ ίϯςφ෦ͰUFYUUYUΛ࡞ $USMʴ1ˠ$USMʴ2Ͱίϯςφ͔Βग़ ίϯςφ෦ͰEPDLFSFOWΛআ "ɿՃ %ɿআ $ɿมߋ
EPDLFSJOTQFDU ίϯςφʹؔ͢ΔৄࡉใΛ+40/ܗࣜͰදࣔ
EPDLFSDPNNJU ίϯςφ͔Β৽͍͠Πϝʔδͷ࡞
ίϯςφ®ϑΝΠϧ
EPDLFSFYQPSUJNQPSU FYQPSUɿίϯςφͷ༰ΛUBSΞʔΧΠϒʹอଘ JNQPSUɿUBSΞʔΧΠϒ͔ΒۭͷΠϝʔδΛ࡞ FYQPSU JNQPSU
ίϯςφҰ࣌ఀࢭ
EPDLFSQBVTFVOQBVTF QBVTFɿίϯςφͷશͯͷϓϩηεΛҰ࣌ఀࢭ VOQBVTFɿίϯςφͷશͯͷϓϩηεͷҰ࣌ఀࢭΛղআ QBVTF VOQBVTF
ίϯςφఀࢭ
EPDLFSTUPQTUBSULJMM TUPQɿ࣮ߦதͷίϯςφʹ4*(5&3.Λૹ৴͠ɺҰఆظؒޙʹ4*(,*--Λૹ৴ LJMMɿ࣮ߦதͷίϯςφΛ4*(,*--͔ࢦఆͨ͠γάφϧͰఀࢭ TUBSUɿఀࢭ͍ͯ͠ΔίϯςφΛىಈ͢Δ TUPQ TUBSU LJMM
ίϯςφ෦͋Ε͜Ε
EPDLFSFYFD ࣮ߦதͷίϯςφͰՃίϚϯυΛ࣮ߦ FYFDͰ࣮ߦ
EPDLFSBUUBDI ࣮ߦதͷίϯςφͰ্ཱ͕͍ͪͬͯΔ 1*%ͷϓϩηεʹରͯ͠ඪ४ೖग़ྗΛଓ͢Δ $USM DͰࢭ·Βͳ͍ $USM DͰࢭ·Δ ٙࣅλʔϛφϧͷׂ
ίϯςφআ
EPDLFSSN ίϯςφͷআ ఀࢭͨ͠ίϯςφআͰ͖Δ ىಈதίϯςφআͰ͖ͳ͍ GΦϓγϣϯͰআͰ͖Δ
SNJ EFMFUFE TUPQQFE QVTI MPHT EJGG JOTQFDU SN QVMM TUBSU
FYFD BUUBDI TUPQLJMM QBVTF QBVTFE QT CVJME VOQBVTF FYQPSU SVO DPNNJU JNQPSU TBWF JNBHFT IJTUPSZ JOTQFDU SVOOJOH UBHT MPBE IUUQTHJUIVCDPNEPDLFSEJTUSJCVUJPO EFTJHOFECZGSPN'MBUJDPO
2JJUBʹ͋ΔΑ IUUQTRJJUBDPNIJIJIJSPSPJUFNT EEBEDBEB
BQQFOEJY
Dockerとは wίϯςφΛɺ࣮ߦ͢ΔͨΊͷϓϥοτϑΥʔϜ w ࣮ߦʹඞཁͳͯ͢ΛϑΝΠϧγεςϜԽ w %PDLFS͕ಈ͘ڥͳΒಈ࡞Λอূ w ϓϩηεͱ্ཱ͕ͯͪ͠ΔͷͰܰྔ
コンテナ wִ͞Ε͍ͯΔܰྔ7.ʢ࣮ଶϓϩηεʣ w/BNF4QBDF wϚϯτɺϓϩηεɺϢʔβͳͲ໊લۭؒ͝ͱʹࣝผɾӅณ͢Δػೳ wDHSPVQ wϓϩηεʹରͯ͠$16ϝϞϦͳͲͷϦιʔεʹ੍ݶΛ͔͚Δ wDISPPU wϧʔτσΟϨΫτϦΛҙͷಛఆͷσΟϨΫτϦʹมߋͰ͖Δ wOFUOT wϗεταʔόʹԾతϒϦοδͱԾ/*$͔ΒͳΔԾωοτϫʔΫΛߏங
レイヤ w%PDLFSΠϝʔδ w֤ϨΠϠࢠؔ wΠϝʔδϨΠϠ 3FBE0OMZ wίϯςφΠϝʔδʹ ৽͍͠ϨΠϠΛՃ ΠϝʔδϨΠϠ ίϯςφϨΠϠ IUUQTEPDTEPDLFSDPNFOHJOFVTFSHVJEF
TUPSBHFESJWFSJNBHFTBOEDPOUBJOFSTDPOUBJOFS BOEMBZFST