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
drone.ioを使って docker build & push自動化
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
jsoizo
October 14, 2015
Technology
2.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
drone.ioを使って docker build & push自動化
Docker LT 20151014
jsoizo
October 14, 2015
More Decks by jsoizo
See All by jsoizo
小さくはじめるPeoperty Based Testing
jsoizo
1
1.1k
kotlinxライブラリの歩き方 〜 Kotlin公式エコシステムを使いこなす〜
jsoizo
1
260
はじめて関数型言語の機能に触れるエンジニア向けの学び方/教え方 / how-to-learn-or-teach-for-fp-beginner
jsoizo
5
1.5k
よくつかっているIterableの自作extensionを紹介します
jsoizo
0
130
HARD THINGS in Ad-Tech Engineering
jsoizo
1
1k
“エンジニア35才定年説に挑戦する” 開発チームのマネジメント
jsoizo
41
16k
Other Decks in Technology
See All in Technology
Microsoft のサポートとフィードバック総まとめ
murachiakira
PRO
0
110
Multi-Agent並列開発を 安全に回すための技術 / Technology for Safely Multi-Agent Parallel Development
tooppoo
0
170
自宅LLMの話
jacopen
1
720
「勝手に広まる」人気 AI エージェントを爆速で作ろう!(AWS Summit Japan 2026講演資料)
minorun365
PRO
10
2.5k
【Snowflake Summit 2026 Recap!!】Snowflake Summit Deep Dive: Security & Governance
civitaspo
1
310
[チョークトーク資料]AWS DevOps Agent を使いこなす / AWS Dev Ops Agent Chalk Talk AWS Summit Japan 2026
kinunori
4
770
水を運ぶ人としてのリーダーシップ
izumii19
4
990
技術・能力を向上する原理原則 #きのこセッションa #きのこ2026
bash0c7
0
120
SteampipeとExcel Power QueryでAWS構成定義書の作成を自動化する
jhashimoto
0
180
[AWS Summit Japan 2026]迷っているあなたへ_小さな一歩が、やがて自分を助けてくれる
sh_fk2
2
410
AIが自律的に回る開発ループを設計してチーム開発に組み込む
nekorush14
0
130
【2026年版】 ベクトル検索とEmbedding最前線
mocobeta
23
7.5k
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
260
Designing Experiences People Love
moore
143
24k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
430
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
KATA
mclloyd
PRO
35
15k
Between Models and Reality
mayunak
4
350
Transcript
drone.ioΛͬͯ docker build & pushࣗಈԽ Oct. 14, 2015 / Docker
LT @jsoizo
whoami • ໊લ : @jsoizo / Jun Sakamoto • ݴޠ
: JavaScriptͱScalaΛগʑ • ࣄ : ࠂωοτϫʔΫͷ։ൃ • ৴αʔόͰ70΄Ͳͷίϯςφ͕ৗ࣌ىಈ on Prod • ॴଐ :
·͍ʹͪ DockerͬͯΔͱ…
Πϝʔδͷ build & push ͔ͬͨΔ͍
Πϝʔδͷ build & push ͔ͬͨΔ͍ 4DBMBίϯύΠϧ͍
Πϝʔδͷ build & push ͔ͬͨΔ͍ 4DBMBίϯύΠϧ͍ ΄΅खಈ(*U'MPX
Πϝʔδͷ build & push ͔ͬͨΔ͍ 4DBMBίϯύΠϧ͍ ΠϝʔδQVTIͷʹ ଠฏ༸ͷ͜͏ͱ௨৴ ΄΅खಈ(*U'MPX
ͱ͍͏͜ͱͰ ࣗಈԽ
None
• goݴޠͰॻ͔ΕͨCI (ݱߦόʔδϣϯ0.3) • OSS൛ https://github.com/drone/drone • δϣϒຖʹDocker ίϯςφΛ্ཱ࣮ͪ͛ͯߦ •
GitHub, GitLabͷhook • gitϦϙδτϦԼͷyamlʹ࣮ߦ༰Λهड़ • irc, Slack, Hipchatͷ௨(by Plugin)
ಈ࡞ϑϩʔ ίϯςφ ᶄ webhook ᶆ docker run ᶅ read drone.yml
ᶉ docker push ᶇ test ᶈ docker builld ᶃ git push
ͬͯΔ͜ͱ ཁ͢Δʹ
Docker in Docker
ͪͳΈʹ ެࣜͷϓϥάΠϯ ͋ΔΑ
None
υΩϡϝϯτҰ ͳ͍͚Ͳͳ!!!
ͻΔ͕͑ͬͯ Docker in Docker
ϑΝΠϧߏ ※ Χοίͷલ߲ͷ࣮ߦॱ % tree -L 2 -a . ├──
.drone.yml // ઃఆϑΝΠϧ ᶅ ├── Dockerfile // ͓ͳ͡ΈϏϧυઃఆ ᶈ ├── activator └── drone ├── build.sh // docker build ᶈ&ᶉ └── test.sh // ςετ࣮ߦ༻sh ᶇ
drone.yml image: jsoizo/java:openjdk-8u66-jdk cache: - /root/.ivy2/cache script: - /bin/sh +x
drone/test.sh - /bin/sh +x drone/build.sh notify: slack: webhook_url: 'https://hooks.slack.com/services/xxxxxxxxxxxxxxxxxx' username: 'drone' channel: '@jsoizo' on_started: false on_success: true on_failure: true
image: jsoizo/java:openjdk-8u66-jdk cache: - /root/.ivy2/cache script: - /bin/sh +x drone/test.sh
- /bin/sh +x drone/build.sh notify: slack: webhook_url: 'https://hooks.slack.com/services/xxxxxxxxxxxxxxxxxx' username: 'drone' channel: '@jsoizo' on_started: false on_success: true on_failure: true JNBHFίϯςφͷΠϝʔδ drone.yml
image: jsoizo/java:openjdk-8u66-jdk cache: - /root/.ivy2/cache script: - /bin/sh +x drone/test.sh
- /bin/sh +x drone/build.sh notify: slack: webhook_url: 'https://hooks.slack.com/services/xxxxxxxxxxxxxxxxxx' username: 'drone' channel: '@jsoizo' on_started: false on_success: true on_failure: true drone.yml DBDIF࠶ར༻ΛΩϟογϡ
image: jsoizo/java:openjdk-8u66-jdk cache: - /root/.ivy2/cache script: - /bin/sh -x drone/test.sh
- /bin/sh -x drone/build.sh notify: slack: webhook_url: 'https://hooks.slack.com/services/xxxxxxxxxxxxxxxxxx' username: 'drone' channel: '@jsoizo' on_started: false on_success: true on_failure: true TDSJQUࣗಈԽ͍ͨ͠ॲཧ drone.yml
image: jsoizo/java:openjdk-8u66-jdk cache: - /root/.ivy2/cache script: - /bin/sh +x drone/test.sh
- /bin/sh +x drone/build.sh notify: slack: webhook_url: 'https://hooks.slack.com/services/xxxxxxxxxxxxxxxxxx' username: 'drone' channel: '@jsoizo' on_started: false on_success: true on_failure: true OPUJGZྃ௨ઌ drone.yml
test.sh #!/bin/bash -eu # ςετ࣮ߦ ./activator test
build.sh #!/bin/bash -eu # DockerσʔϞϯىಈ /usr/local/bin/wrapdocker & sleep 5 DRONE_COMMIT_SHORT=`git
rev-parse --short ${DRONE_COMMIT}` # quay.ioʹϩάΠϯ docker login -e="." -u="jsoizo+drone_20151014" -p="XXXXXXXXXXX" quay.io # build docker build -t quay.io/jsoizo/play-docker-lt-20151014:${DRONE_BRANCH}-${DRONE_COMMIT_SHORT} . # push docker push quay.io/jsoizo/play-docker-lt-20151014:${DRONE_BRANCH}-${DRONE_COMMIT_SHORT} # DockerσʔϞϯऴྃ start-stop-daemon --stop --pidfile "/var/run/docker.
#!/bin/bash -eu # DockerσʔϞϯىಈ /usr/local/bin/wrapdocker & sleep 5 DRONE_COMMIT_SHORT=`git rev-parse
--short ${DRONE_COMMIT}` # quay.ioʹϩάΠϯ docker login -e="." -u="jsoizo+drone_20151014" -p="XXXXXXXXXXX" quay.io # build docker build -t quay.io/jsoizo/play-docker-lt-20151014:${DRONE_BRANCH}-${DRONE_COMMIT_SHORT} . # push docker push quay.io/jsoizo/play-docker-lt-20151014:${DRONE_BRANCH}-${DRONE_COMMIT_SHORT} # DockerσʔϞϯऴྃ start-stop-daemon --stop --pidfile "/var/run/docker. build.sh MPHJO
#!/bin/bash -eu # DockerσʔϞϯىಈ /usr/local/bin/wrapdocker & sleep 5 DRONE_COMMIT_SHORT=`git rev-parse
--short ${DRONE_COMMIT}` # quay.ioʹϩάΠϯ docker login -e="." -u="jsoizo+drone_20151014" -p="XXXXXXXXXXX" quay.io # build docker build -t quay.io/jsoizo/play-docker-lt-20151014:${DRONE_BRANCH}-$ {DRONE_COMMIT_SHORT} . # push docker push quay.io/jsoizo/play-docker-lt-20151014:${DRONE_BRANCH}-${DRONE_COMMIT_SHORT} # DockerσʔϞϯऴྃ build.sh CVJME
#!/bin/bash -eu # DockerσʔϞϯىಈ /usr/local/bin/wrapdocker & sleep 5 DRONE_COMMIT_SHORT=`git rev-parse
--short ${DRONE_COMMIT}` # quay.ioʹϩάΠϯ docker login -e="." -u="jsoizo+drone_20151014" -p="XXXXXXXXXXX" quay.io # build docker build -t quay.io/jsoizo/play-docker-lt-20151014:${DRONE_BRANCH}-${DRONE_COMMIT_SHORT} . # push docker push quay.io/jsoizo/play-docker-lt-20151014:${DRONE_BRANCH}-$ {DRONE_COMMIT_SHORT} # DockerσʔϞϯऴྃ build.sh QVTI
ͪͳΈʹ
Registry :
• CoreOS͕ࣾӡӦ͢ΔDocker Registry • “͖ʔ͍͓͋ʔ”ͬͯಡΉͬΆ͍ʔ • DockerHubͱൺͯ • (࠾༻࣌) ΠϝʔδͷDL͕͔ͬͨ
• [ࢲݟ] Web UIͷૢ࡞ੑ͕ྑ͍ • DockerHubΈͨ͘ token Ͱpushͱ͔ग़དྷͳ͍͕ • RobotΞΧϯτΛ࡞ΕΔ => ࣗಈԽͷ͓ڙʹ
drone.ioࢼͯ͠Έͨ ݁ՌɺͲ͏Α???
ͱΓ͋͑ͣ ࣗಈԽग़དྷͨ
͕ɺ՝͕ࢁΓͰ վળͷ༨͋Γ
͕ɺ՝͕ࢁΓͰ վળͷ༨͋Γ '30.ͷΠϝʔδΛ ຖճ%-ͯ͠Δ (JU'MPXΛ ࣗಈԽͰ͖ͯͳ͍ Ϗϧυ࣌ʹ%-ͨ͠KBSΛ Ωϟογϡ͍ͨ͠
ҰํͰɺ ϙδςΟϒͳ
v0.4Ͱେ෯ʹ ػೳՃ͕͋Δ༷ https://github.com/drone/drone/tree/0.4.0 http://readme.drone.io/docs/build/index.html
ྫ) ίϯςφىಈ࣌ͷ Φϓγϣϯ͕૿͑Δ WPMVNFΛࢦఆͰ͖Δ ˠϗετͷTPDLFUϚϯτ͢Ε %PDLFSJO%PDLFS͔Βଔۀग़དྷͦ͏
ྫ) docker-compose෩ʹ αϙʔτίϯςφΛ ্͛ΒΕΕΔ FH"FSPTQJLFͳͲͷ ϨΞͳ%#ͷࢀরͱ͔ʹ
·ͱΊ
Summary • drone.io : golang CI • drone.ymlʹॻ͔Εͨͱ͓ΓʹϏϧυͯ͘͠ΕΔ • drone.ioڥԼͰͷdockerͷΠϝʔδϏϧυ
• Docker in Docker • pluginυΩϡϝϯτෆͰఘΊͨ • Service(link)Λ্ख͘͏ํ๏͕͋Γͦ͏ • ·ͩग़དྷΔ͜ͱগͳ͍(v0.3)ͷͰԿͰΓ͍ͨਓʹΩπΠ • v0.4Ͱվળ͞Εͦ͏
Thank You!!!