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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
1k
kotlinxライブラリの歩き方 〜 Kotlin公式エコシステムを使いこなす〜
jsoizo
1
250
はじめて関数型言語の機能に触れるエンジニア向けの学び方/教え方 / 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
チームで進めるAI駆動アジャイル×ウォーターフォール
kumaiu
0
120
AI活用を推進するために ファインディが下した、一つの小さな決断
starfish719
0
280
AIソロプレナー時代に2ヶ月で20人増員した事業創造会社の開発組織の話
miyatakoji
0
270
機械学習を「社会実装」するということ 2026年夏版 / Social Implementation of Machine Learning June 2026 Version
moepy_stats
2
530
Agentic ERPをどう設計するか ー 受発注エージェントを動かす、現場の知見と設計思想ー
recerqainc
1
2k
あなたの AI ワークスペースに、 専門コーダーを連れてくる - Amazon Quick Desktop 最新情報
kawaji_scratch
1
120
GoとSIMDとWasmの今。
askua
3
520
Reliability in the Age of AI: Engineering for AI Velocity
rrreeeyyy
0
110
Claude Code の Sandbox 機能を Anthropic Sandbox Runtime(srt) で試そう!/lets-play-anthropic-sandbox-runtime
tomoki10
1
320
SIer20年! 培ったスキルがスタートアップで輝く時
shucho0103
0
790
Agentic Web
dynamis
1
190
AIを「創る」と「使う」の循環 — HRテックが実践するリアルなAI組織実装
taketo957
0
1.8k
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Designing Powerful Visuals for Engaging Learning
tmiket
1
400
Mobile First: as difficult as doing things right
swwweet
225
10k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
460
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
160
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
200
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!!!