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
CircleCI 2.0 を使い倒そう / phpcon kansai 2018 circlc...
Search
TAKAHASHI Kunihiko
July 14, 2018
Technology
7
2.6k
CircleCI 2.0 を使い倒そう / phpcon kansai 2018 circlci docker
PHPカンファレンス関西 2018 CircleCI 2.0 を使い倒そうというタイトルでトークしたものです
TAKAHASHI Kunihiko
July 14, 2018
Tweet
Share
More Decks by TAKAHASHI Kunihiko
See All by TAKAHASHI Kunihiko
Apache から LiteSpeed に乗り換えてみませんか? / php-conference-japan-2019-track5-hello-litespeed
kunit
1
1.5k
Webアプリケーションエンジニアだった私がホスティング事業に興味を持った理由 / Fukuoka UIJ Turn gmo pepabo
kunit
0
460
アプリケーションエンジニアな私がホスティング業界に来て感じたあれこれ / ChugokuDB Vol27
kunit
0
560
Google App Engine PHP 7.2 を試してみる #phpstudy / google app engine php 7.2
kunit
1
920
独立したコアレイヤパターンをためしてみる / try independent core layer pattern
kunit
3
930
PHPのバージョンアップについてあれこれ / luncers lunch study 3 php version up
kunit
0
2.1k
CircleCI の歩き方 / CircleCI #phpstudy
kunit
2
250
CircleCI 2.0 をつかってみよう / CircleCI #phpcondo2017
kunit
0
670
Docker for Mac/Winってどうなの? / #fukuokaphp docker for mac and win
kunit
0
200
Other Decks in Technology
See All in Technology
なぜCodeceptJSを選んだか
goataka
0
160
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
270
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
260
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
190
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
170
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
3
350
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
270
多領域インシデントマネジメントへの挑戦:ハードウェアとソフトウェアの融合が生む課題/Challenge to multidisciplinary incident management: Issues created by the fusion of hardware and software
bitkey
PRO
2
110
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
490
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.5k
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
200
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
33
3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
A Modern Web Designer's Workflow
chriscoyier
693
190k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
How to Ace a Technical Interview
jacobian
276
23k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
4 Signs Your Business is Dying
shpigford
181
21k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Unsuck your backbone
ammeep
669
57k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Making the Leap to Tech Lead
cromwellryan
133
9k
Transcript
$JSDMF$* Λ͍ͦ͏ QIQDPOGFSFODF,BOTBJ LVOJU
ࣗݾհ ✓ !LVOJU ✓ߴڮ ✓OFDPNPSJ--$ ✓ʮ1)1ϚχϡΞϧΛಡ͏ʯQPEDBTU ✓IUUQQIQNBOVBMOFDPNPSJBTJB ✓QIQPOEPD ✓ฌݿݝग़
Կ͓͍ͯ ✓ݱࡏɺདྷͷ$BLF'FTUΛͲ͜Ͱ։࠵͢ Δ͔ͱ͍͏։࠵ͷථ͕ߦΘΕ͍ͯ·͢ ✓ͦͷީิʹͳΜͱຊؚ͕·Ε͓ͯΓ·͢ ͷͰͥͻօ͞ΜථΛ͓ئ͍͠·͢ʂ ✓IUUQTDBLFGFTUPSH ✓ථʹ.Z$BLF1)1αΠτͷొ ͕ඞཁͱͳΔͷͰͦͷ͚͓ͩؾΛ͚ͭͩ͘ ͍͞ʂ
ͦͦ$*ͱ ✓8JLJQFEJB͞ΜʹΑΕ ✓$POUJOVPVT*OUFHSBUJPOͷུ ✓ܧଓతΠϯςάϨʔγϣϯ ✓ओʹϓϩάϥϚʔͷΞϓϦέʔγϣϯ࡞࣌ͷ ࣭վળೲظͷॖͷͨΊͷश׳ͷ͜ͱͰ͋Δɻ ΤΫετϦʔϜɾϓϩάϥϛϯά 91 ͷϓϥΫ ςΟεͷҰͭͰɺڱٛʹϏϧυςετɺΠϯ
εϖΫγϣϯͳͲΛܧଓతʹ࣮ߦ͍ͯ͘͜͠ͱΛ ҙຯ͢Δ
݁ہ$*ͬͯͳʹ͢Μͩʁ ✓ԿΒ͔ͷτϦΨʔΛड͚ͯ ✓ܾΊΒΕͨॲཧΛߦ͏
τϦΨʔͱͳΔͷ ✓(JU)VCʹίʔυΛ QVTIͨ͠ͱ͖ʹىಈ ✓ܾΊΒΕͨ࣌ؒʹىಈ ✓खಈͰىಈ
࣮ߦ͢Δॲཧྫ ✓ඞཁͳϥΠϒϥϦͷΠϯετʔϧ ✓DPNQPTFSJOTUBMMతͳ ✓ίʔσΟϯάελΠϧνΣοΫ ✓߹ʹΑͬͯίʔυϑΥϚοτ͔͚ͯ͠·͏ ✓จ๏νΣοΫ ✓ίϯύΠϧϦϯΫ 1)1Ͱͳ͍͚Ͳ ✓ςετ
୯ମ&& ✓σϓϩΠ
$JSDMF$*ʹ͍ͭͯ ✓ͱͱ͍͏όʔδϣϯҧ͍ͷαʔϏ ε͕͋Δ ✓དྷ݄ ʹऴྃ͢Δ ✓͍͠ͱ͍͏ΛΑ͘ฉ͘ ✓͍ͭ࠷ۙ$JSDMF$*+BQBO͕Ͱ͖ͯɺࠓ πΠολʔͰઈࢍΤΰαʔν͞ΕͯΔͷͰɺ ࣭ͨ͠Β͙͢ʹ৯͍͍ͭͯΒ͑Δ͔Βνϟ
ϯεʂ
͞ΑͳΒ$JSDMF$* ✓6CVOUVͰͭ͘ΒΕͨશ෦ೖΓͷ7.্Ͱ ςετΛߦ͏ ✓QIQFOW͕ΘΕ͍ͯͯඞཁʹԠͯ͡όʔ δϣϯΛΓସ͑Δ ✓.Z42-3FEJTඞཁʹԠͯ͑͡Δ ✓σϑΥϧτͷڍಈ͕͋ΓɺͦΕΛͦͷ·· ͑ྑ͍ͷͰ͋Εઃఆ͕͋·Γඞཁͳ͔ͬͨ ✓ͳΕͨਓ͔Β͢Δͱͱͯ؆୯
Α͏ͦ͜$JSDMF$* ✓ಉ༷ͷ7.ϕʔεͷॲཧͰ͖Δ͕ਪ͞Εͯͳ ͍ ✓ਪ͞ΕΔͷ%PDLFSΠϝʔδΛ͏ͷ ✓%PDLFSͷ͕ࣝඞཁͱͳΔͷͰ֮͑Δ͜ͱ͕૿͑ ͨ ✓.Z42-3FEJTΛ͔ͭ͏ͳΒɺͦΕ༻ͷ %PDLFSΠϝʔδΛ͏ඞཁ͕͋Δ ✓Θ͔ͬͯ͠·͑ɺԿ͔ίϯτϩʔϧͰ͖ΔͷͰ ศརͳͷ͕ͩɺ֮͑Δ͜ͱ͕૿͑ͨͷͰͱ͖ͬͭʹ͍͘
͍͠ͱ͍͍ͬͯΔͻͱ͕ଟ͍
$JSDMF$*ͷར༻ྉۚʁ ✓ແྉ͕͋Δͷͬͯ͠·ͨ͠ʁ ✓ίϯςφ ✓ฒྻ࣮ߦͰ͖ͳ͍ ✓݄·ͰॲཧՄೳ ✓ຊ֨తʹ͏ͱ͍͍ײ͡ʹ͍Δ࣌ؒ ✓ରϦϙδτϦ࣮ߦϢʔβ͕ෳͰ͍͍ ✓ϓϥΠϕʔτϦϙδτϦͰ͍͍ ✓ฒྻɺ࣮ߦίϯςφʹԠͯ͡՝ۚ͞ΕΔ ✓ίϯςφ૿͢͝ͱʹ݄
✓·ͩҰൠެ։͞Εͯͳ͍͕ɺैྔ՝ۚϓϥϯՃ͞ΕΔ༧ఆ
$JSDMF$*Ͱͷಈ࡞Πϝʔδ ✓%PDLFSΠϝʔδΛऔಘ͠ɺίϯςφΛىಈ ✓ىಈͨ͠ίϯςφ্ʹιʔεΛHJUDMPOF ✓ىಈͨ͠ίϯςφ্ͰDPNQPTFSJOTUBMMΛ࣮ߦ ✓ىಈͨ͠ίϯςφ্ͰQIQDTΛͬͯίʔσΟϯά ελΠϧνΣοΫ ✓ىಈͨ͠ίϯςφ্Ͱ1IBOΛͬͯ੩తղੳͯ͠จ ๏νΣοΫ ✓ىಈͨ͠ίϯςφ্Ͱ1)16OJUΛͬͯ୯ମςετ ✓͜͜·Ͱͷॲཧ͕ޭ͔ͨ͠Ͳ͏͔ΛTMBDLʹ௨
$JSDMF$*ͱͷ࿈ܞํ๏ ✓ઃఆϑΝΠϧɺϦϙδτϦͷτο ϓʹDJSDMFDJͱ͍͏σΟϨΫτ ϦΛ࡞ΓɺͦͷதʹDPOpHZNM ͱ͍͏ϑΝΠϧΛஔ͘ͱͦΕΛͬ ͯ$*͕࣮ߦ͞ΕΔ ✓DPOpHZNMͷॻ͖ํΛ؆୯ʹ આ໌͍͖ͯ͠·͢
DJSDMFDJDPOpHZNM version: 2 jobs: build: docker: - image: circleci/php:7.1-apache-browsers -
image: circleci/mysql:5.7 steps: - checkout - restore_cache: keys: - composer-{{ arch }}—{{ checksum "composer.lock" }} - run: composer install - save_cache: key: composer-{{ arch }}—{{ checksum "composer.lock" }} paths: - ~/.composer/cache - run: ./vendor/bin/phpcs —standard=PSR2 ./app - run: mkdir ~/phpunit - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - store_test_results: path: ~/phpunit - store_artifacts: path: ~/phpunit
DJSDMFDJDPOpHZNM ✓ઃఆ͢ΔηΫγϣϯ ✓KPCT ✓ෳͷδϣϒΛઃఆ͢Δ ✓XPSLqPXT ✓ෳͷδϣϒΛͲͷΑ͏ʹ࣮ߦ ͢Δ͔Λઃఆ͢Δ
DJSDMFDJDPOpHZNM version: 2 jobs: build: docker: - image: circleci/php:7.1-apache-browsers -
image: circleci/mysql:5.7 steps: - checkout - restore_cache: keys: - composer-{{ arch }}—{{ checksum "composer.lock" }} - run: composer install - save_cache: key: composer-{{ arch }}—{{ checksum "composer.lock" }} paths: - ~/.composer/cache - run: ./vendor/bin/phpcs —standard=PSR2 ./app - run: mkdir ~/phpunit - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - store_test_results: path: ~/phpunit - store_artifacts: path: ~/phpunit
KPCT ✓δϣϒΛઃఆ͢Δ δϣϒෳ͋ͬͯྑ͍ ✓δϣϒ໊ ௨ৗCVJMEͱ͍͏໊લʹ͢Δ ✓ޙ΄Ͳग़ͯ͘ΔXPSLqPXͰ༻͢Δ ✓FYFDVUPSΛઃఆ ✓EPDLFS
✓NBDIJOF ಉ༷ͷ7.ڥ ✓NBDPT ✓TUFQTͰࡉ͔͍࣮ߦ༰Λઃఆ͢Δ
DJSDMFDJDPOpHZNM version: 2 jobs: build: docker: - image: circleci/php:7.1-apache-browsers -
image: circleci/mysql:5.7 steps: - checkout - restore_cache: keys: - composer-{{ arch }}—{{ checksum "composer.lock" }} - run: composer install - save_cache: key: composer-{{ arch }}—{{ checksum "composer.lock" }} paths: - ~/.composer/cache - run: ./vendor/bin/phpcs —standard=PSR2 ./app - run: mkdir ~/phpunit - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - store_test_results: path: ~/phpunit - store_artifacts: path: ~/phpunit
TUFQT ✓DIFDLPVU ✓ιʔεΛDIFDLPVU͢Δ ✓SVO ✓ίϚϯυΛ࣮ߦ͢Δ ✓SFTUPSF@DBDIFTBWF@DBDIF ✓DPNQPTFSCVOEMFSΛຖճ͍ͬͯΔͱ࣌ؒ ͷΉͩͳͷͰɺదͳΩʔΛͬͯΩϟογϡ͢Δ ✓TUPSF@UFTU@SFTVMUTTUPSF@BSUJGBDUT ✓ςετ݁ՌΛ$*ͷ݁Ռදࣔʹөͤ͞Δ
DJSDMFDJDPOpHZNM version: 2 jobs: build: docker: - image: circleci/php:7.1-apache-browsers -
image: circleci/mysql:5.7 steps: - checkout - restore_cache: keys: - composer-{{ arch }}—{{ checksum "composer.lock" }} - run: composer install - save_cache: key: composer-{{ arch }}—{{ checksum "composer.lock" }} paths: - ~/.composer/cache - run: ./vendor/bin/phpcs —standard=PSR2 ./app - run: mkdir ~/phpunit - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - store_test_results: path: ~/phpunit - store_artifacts: path: ~/phpunit
SVO ✓ίϚϯυΛ࣮ߦ͢Δͷͩ ͕ɺ࣮ߦը໘Ͱදࣔ͢Δจࣈ ྻΛઃఆͰ͖Δ - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml -
run: name: run tests command: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - run: name: run tests command: | ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml
ෳͷ%PDLFSΠϝʔδΛ͏ ✓EPDLFSFYFDVUPSͷઃఆͰෳͷΠϝʔδΛࢦఆ͢Δ ✓ͭʹࢦఆͨ͠Πϝʔδ͕ϓϥΠϚϦΠϝʔδʹͳΓɺ TUFQTҎ߱ͷίϚϯυͦͷΠϝʔδʹର࣮ͯ͠ߦ͞ΕΔ ✓ͦͷଞͷίϯςφͷϓϩηεʹɺ ϙʔτ൪ ߸ ͰΞΫηεͰ͖Δ version: 2
jobs: build: docker: - image: php:7.1-apache - image: circleci/mysql:5.7 environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: test_app MYSQL_USER: test MYSQL_PASSWORD: test - image: redis:3.2
XPSLqPX ✓ෳͷδϣϒΛͲͷΑ͏ͳґଘؔ ॱ൪ Ͱ࣮ߦ͢Δ͔ΛఆٛͰ͖Δ ✓ྫ͑ɺQIQDTͰΤϥʔ͕ͳ͍ ߹ͷΈɺQIQVOJUΛΒ͍ͤͨͱ͔ ✓ܾ·ͬͨ࣌ؒʹδϣϒΛ࣮ߦ͢Δ ػೳ͋Δ
DJSDMFDJDPOpHZNM version: 2 jobs: phpcs: ... test: ... deploy: ...
workflows: version: 2 phpcs_test_deploy_workflow: jobs: - phpcs - test: requires: - phpcs - deploy filters: branches: only: - master requires: - test
DJSDMFDJDPOpHZNM version: 2 jobs: daily_job: ... workflows: version: 2 cron_workflow:
triggers: - schedule: cron: “0 18 * * *” filters: branches: only: - develop jobs: - daily_job
$JSDMF$* ✓ઃఆʹؔͯ͠ɺ࣮ߦ͍ͨ͠ίϚϯυ ΛSVOͰฒ͍͚͍͍͚ͯͩͳͷͰ ͦΜͳʹ͘͠ͳ͍ ✓ϩʔΧϧͰಈ࡞νΣοΫ͢Δ DJSDMFDJίϚϯυ͕४උ͞Ε͍ͯΔ ✓ඍົʹڍಈ͕͓͔͍͠ ✓XPSLqPXʹରԠͯ͠ͳ͍ɾɾɾ
$JSDMF$* ✓ಈ࡞Πϝʔδͱઃఆํ๏͕ Θ͔ͬͯ؊৺ͷ%PDLFS ͷ͜ͱ͕Θ͔Βͳ͍ͷͰɺͲ ͏ͨ͠Βྑ͍͔Θ͔Βͳ͍ ✓ͱ͍͏͜ͱͰɺ͔͜͜Β %PDLFSೖ
࣌ؒνΣοΫ ͜͜·Ͱ ͩͱྑ͍ͳɾɾɾ
%PDLFSͷқ ✓%PDLFSͷқஈ֊ʹ ͔ΕΔͷͰͳ͍͔ʁ ✓ୈҰஈ֊͞Ε͍ͯΔΠ ϝʔδΛར༻͢Δ͚ͩ ✓ୈೋஈ֊ࣗͰΠϝʔδΛ ࡞ͯͦ͠ΕΛར༻͢Δ
Πϝʔδ ✓%PDLFS)VCͱ͍͏࡞ࡁΈΠϝʔδ Λ͢Δॴ͕͋Δ ✓ͦ͜ʹͨ͘͞ΜͷΠϝʔδ͕ஔ͔Ε͍ͯ ΔͷͰͦΕΛར༻͢Δ͚ͩͰ͔ͳΓͷ͜ ͱ͕Ͱ͖Δ ✓ײ֮తʹCSFXJOTUBMMͰNZTRM ΛϩʔΧϧʹೖΕΔΈ͍ͨͳؾͰ͔ͭ͑ Δ
࣮ࡍʹͬͯΈΔ ✓1)1 BQBDIFΛ %PDLFSͰಈ͔ͯ͠ΈΔ ˞EPDLFSίϚϯυͷΦϓγϣϯ͕͓΅͑ΒΕΜͷΜ ͡Όʔͱ͍͏͝ҙݟʹಉҙ͠·͢ɻ͍͋͢͝Δͷ Ͱɾɾɾ docker container run
-it --rm -p 80:80 -v ~/Study/phpkansai/ demo/htdocs:/var/www/html php:7.1-apache
Πϝʔδ ✓ͨͩ͠ɺࣗͷ༻్ʹશʹ߹க͍ͯ͠ΔͱݶΒͳ͍ ✓ྫ͑ɺ1)1ͷΦϑΟγϟϧΠϝʔδʹJOUM֦ு YEFCVHೖͬͯͳ͍ ✓ΦϑΟγϟϧΠϝʔδ͋Δఔ৴༻Ͱ͖Δ͕ɺྑΠϝʔ δجຊతʹ৴༻Ͱ͖ͳ͍ ✓͍ͭ࠷ۙɺ%PDLFS)VCͰ͞Ε͍ͯͨΠϝʔδʹʮ҉ ߸௨՟࠾۷Ϙοτʯ͕ೖ͍ͬͯͨ͜ͱ͕χϡʔεʹͳͬͯͨ ✓IUUQTKQUFDIDSVODIDPN UBJOUFEDSZQUP
NJOJOHDPOUBJOFSTQVMMFEGSPNEPDLFSIVC
ͳΒࣗͰͭ͘Ζ͏ ✓%PDLFSΠϝʔδΛࣗͰͭ͘Ζ͏ͱ ͢ΔͱҎԼͷ͕ࣝඞཁ ✓%PDLFSࣗମͷཧղ ✓-JOVYσΟετϦϏϡʔγϣϯͷཧղ ✓ZVNͱ͔BQUͱ͔ ✓-JOVYίϚϯυͷཧղ ✓֤ιϑτΣΞͷNBLFํ๏ͷཧղ
ٸʹϋʔυϧ͕͕͋Δ ✓ઌఔ͍͕ͬͨɺ%PDLFS)VCͰΦϑΟγϟϧΠ ϝʔδ͕͞Ε͍ͯΔ ✓͋ΘͤͯΠϝʔδΛ࡞͢ΔͱͱͳΔ%PDLFSpMF ͕ެ։͞Ε͍ͯΔͷ͕͋Δ ✓ެ։͞Ε͍ͯΔ%PDLFSpMFΛΈΔ͚ͩͰ͔ͳΓ ͷ͕ࣝಘΒΕΔ ✓ͳͷͰ࠷ॳΦϑΟγϟϧΠϝʔδΛݩʹɺখมߋͨ͠ ΠϝʔδΛ࡞Δͱ͜Ζ͔Β࢝ΊΔͷ͕͍͍ ✓1)1ͷΦϑΟγϟϧΠϝʔδʹYEFCVH֦ுΛ͍
Ε͚ͨͩͷΠϝʔδΛ࡞Δͱ͔
ࣗͰΠϝʔδΛ࡞ΔϝϦοτ ✓ྫ͑ɺ$JSDMS$*Ͱɺ1)1ͷΦϑΟ γϟϧΠϝʔδΛͦͷ··͏ͱɺຖճ$* Λճͨ͢ͼʹJOUM֦ுΛೖΕΔॲཧΛ ΒͤΔඞཁ͕͋Δ ✓$*ͷ͕࣌ؒ৳ͼΔ ✓༧ΊJOUM֦ு͕ೖͬͨΠϝʔδΛ࡞ͬͯ ͓͚ɺͦͷ͚࣌ؒͩ$*ͷ͕࣌ؒॖͰ ͖Δ
%PDLFSʹ͍ͭͯ ✓ࠓճͷηογϣϯͰΑ͘Θ͔ΒΜ͔ͬͨ ํɺͥͻͱ͘͞ΒΠϯλʔωοτॴଐ ͷલဠ͞ΜͷࢿྉΛࢀর͍ͯͨͩ͘͠ͷ͕ ͍͍͔ͱࢥ͍·͢ ✓લဠ͞Μͷࢿྉ%PDLFSʹֶ͍ͭͯͿ ͷʹ࠷దͩͱࢥ͍·͢ ࢲେม͓ੈʹ ͳ͓ͬͯΓ·͢
✓IUUQTXXXTMJEFTIBSFOFU[FNCVUTV
ϚϯΨͰΘ͔Δ%PDLFS ✓ື͍͋͞Μ͕ϚϯΨͰΘ͔Δ %PDLFSͱ͍͏ࢠΛॻ͔Εͯ·͢ ✓͜Εଓ͖Ͱࠓޙଓ͘Έ͍ͨ ͳͷͰ͜Ε͔Β࢝ΊΑ͏ͱ͍͏ํʹ ͪΐ͏Ͳ͍͍͔ʂ ✓IUUQTOPUFNV MMNJOBUPMMOOGECFGGD
ͯ͞ɺ%PDLFSͱ ✓%PDLFSࣾ چEPU$MPVE Λத৺ʹΦʔ ϓϯιʔεͱͯ͠։ൃ͞Ε͍ͯΔίϯςφ ܕԾԽٕज़ ✓ͷय़ʹόʔδϣϯͷ͚ํ͕มߋ ͞Εͯɺ%PDLFS$&ͱ͍ͬͨܗ ʹͳͬͨ ✓ͦΕ·Ͱɺ%PDLFSΈ͍ͨͳ
ײͩͬͨ͡
7.ͱͷҧ͍ ✓7.࣮ࡍͷϋʔυΣΞ ΛΤϛϡϨʔγϣϯ͠ɺͦͷ্ Ͱ࣮ࡍͷ04ΛՔಇͤ͞Δ ✓ίϯςφܕԾԽٕज़Ͱɺ طʹಈ͍͍ͯΔ04ͷϦιʔεΛ ͬͯɺ৽ͨͳڥΛىಈ͢Δ
7.ͱͷҧ͍ )8 04 )ZQFSWJTPS )8 )8 04 04 "QBDIF 3FEJT
1)1 "QQT )8 04 .Z42- 7. )8 04 %PDLFS&OHJOF "QBDIF 3FEJT 1)1 "QQT .Z42- %PDLFS
Կ͕خ͍͠ͷʁ ✓ىಈ͕͍࣌ؒ ✓Ծ)8͓Αͼ04ͷى ಈ෦͕ͳ͍ ✓ফඅϦιʔε͕গͳ͍
%PDLFSͷಈ࡞ Registry image container docker image pull docker image push
docker container run docker container commit Dockerfile docker image build docker container exec
3FHJTUSZͱ ✓%PDLFS)VCͷΑ͏ʹɺ%PDLFSΠϝʔδΛ͢Δ ͷΛ3FHJTUSZͱ͍͏ ✓%PDLFS)VC%PDLFS͕ࣾӡӦ͍ͯ͠Δ3FHJTUSZ ✓"84ʹ&$3ɺ(PPHMF$MPVEʹ($3ͱ͍͏ 3FHJTUSZ͕͋Δ ✓%PDLFS)VCͰ͞ΕͯΔͷ ✓$FOU04VCVOUVͷ04ͷΠϝʔδ ✓1)13VCZͷݴޠؚ͕·ΕΔΠϝʔδ ✓&MBTUJD4FBSDI5FOTPS'MPXͷιϑτΣΞؚ͕
·ΕΔΠϝʔδ
࣮ࡍͲ͏͏ͷ͔ʁ ✓%PDLFS)VC͔Β%PDLFSΠϝʔδΛऔಘ͢Δ ✓औಘͨ͠ΠϝʔδΛ࣮ߦ͢Δͱ࣮ߦڥίϯςφ ͱͯ͠ಈ࡞͢Δ ✓7.ͱҧͬͯɺ࣮ߦΛऴྃ͢Δͱίϯςφʹର͢Δ มߋഁغ͞ΕΔ ✓࣮ߦ͢Δͨͼʹಉ͡ঢ়ଶ͔Βಈ࡞͢Δ ✓ͦΕͰࠔΔ߹ ·͊ɺ΄ͱΜͲ͕ͩ ɺϩʔΧ
ϧͷϑΝΠϧγεςϜΛϚϯτͯͦ͜͠ʹσʔλ ΛӬଓԽ͢Δ
Πϝʔδͱίϯςφ ✓࠷ॳΑͬͪ͘͝ΌʹͳΔ ✓%PDLFSΛ֮͑Δࡍͷ࠷ॳͷϋʔ υϧ ✓࣮ࡍʹಈ͔ͯ͠ײ֮Λ֮͑Δ ✓1)1ͱ1)1ͷΠϝʔδ Λऔಘͯ͠ίϯςφΛಈ͔ͯ͠ΈΔ
ࣗͰJNBHFΛCVJME ✓%PDLFS)VCͰ͞Ε͍ͯΔΠϝʔδ ΛݩʹಠࣗʹΧελϚΠζͨ͠ΠϝʔδΛ࡞ ͢Δ ✓%PDLFS)VCͰ͞Ε͍ͯΔ1)1ͷΠ ϝʔδ൚༻తͳͷͰɺྫ͑JOUM֦ு ೖ͍ͬͯͳ͍ͷͰɺ࠷ۙͷϑϨʔϜϫʔΫΛಈ ͔ͦ͏ͱ͢ΔͱɺಠࣗCVJME͢Δඞཁ͕͋Δ ✓ͦ͏͍ͬͨ߹ʹ͏ͷ͕%PDLFSpMF
Ξϯνύλʔϯ ✓طʹ7BHSBOU BOTJCMFͷڥ͕͋Δ߹ʹɺ %PDLFSΠϝʔδͷ࡞ʹBOTJCMFͷϓϨΠϒοΫ Λ͑ͳ͍͔ࢼ͢ ✓·ΔͷͰΊͨ΄͏͕͍͍ ✓গͳ͘ͱࢲ·ͬͨ ✓Ͳͬͪʹ͕͋ͬͯಈ͔ͳ͍ͷ͔Θ͔Βͳ͘ͳΔ ✓ૉʹ%PDLFSpMF͔Β࡞Δํ๏Λ࠷ॳʹशಘ͠ ·͠ΐ͏
✓BOTJCMFͱͷΈ߹ΘͤΛࢼ͢ͷͦͷޙͰ͍͍
%PDLFSpMF ✓'30.36/"%%$01:ͷগͷ ίϚϯυΛͬͯɺΠϝʔδΛ࡞͢Δखॱ Λࣔ͢ϑΝΠϧ ✓ඞཁͳࣝͱͯ͠TIεΫϦϓτΛॻ͘ ײ͡ ✓࣮ߦ͍ͯ͘͠ίϚϯυΛॱ൪ʹهड़ͯ͠ ͍͘ײ͡ ✓͜ͷϑΝΠϧΛݩʹΠϝʔδΛCVJME͢Δ
%PDLFSpMFͱCVJMEํ๏ FROM php:7.2-cli RUN pecl install xdebug-2.6.0 \ && docker-php-ext-enable
xdebug docker build -t kunit/php:7.2-cli . docker run -it --rm kunit/php:7.2-cli php -v docker run -it --rm php:7.2-cli php -v
͜Θ͘ͳ͍Αʂ ✓$JSDMF$*%PDLFS ͳΕΔͱͱͯศར ✓ಛʹ%PDLFSؔ࿈ͷٕज़ ࠓޙͲΜͲΜ্͕ͬ ͍ͯ͘ͱࢥ͏ͷͰ͜ΕΛػձ ʹ֮͑Δͷ͕͍͍ͱࢥ͏
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠